Best way to flatten layers from php library

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
oscar.ruz
Posts: 1
Joined: 2019-03-14T04:57:10-07:00
Authentication code: 1152

Best way to flatten layers from php library

Post by oscar.ruz »

Hello,

I'm developing a web site to manage images. In this site included an image library for that the users uploads permitted images files(jpg, tiff and psd) and the server creates a low resolution image.

Then I have a problem with the files with layers(tiff and psd). I have used a simple code to merge the layers using the function: mergeImageLayers with the constant(LAYERMETHOD_FLATTEN). Using this the 80% of the files creates a good low resolution but the another 20% not :(

For example when it uploaded a psd/tiff file with touch-up color layer show an error with Internal Server Error bla bla bla...

I need help with this files. Which is the best way to solved this issue?

Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Best way to flatten layers from php library

Post by fmw42 »

Please post a link to one of your problem images.

Please, always provide your IM version and platform when asking questions, since syntax may differ.

Also provide your exact command line and your images, if possible.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
https://imagemagick.org/script/porting.php#cli
Post Reply