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?".
Sorry if this is a duplicate post. I am unsure where to place as I ave gotten views but no responses. Any one have any ideas?
I am using IM 6.4.0-2-Q16 to convert and bild jpgs for Illustrator and Photoshop files uploaded to a directory on my server. On alot of photoshop files I get a bizarre preview image. The image has white squares or sometimes garbled lines in place of where the image goes. The files are quite often very large that it is building the image from. Others i build just fine. I suspect it has something to do with transparency or effects applied to layers. I am flattening the image and converting to rgb to try and resolve the issue
This is the code I have tried (2 versions) same results with both
Latest:
Convert """&Whichfolder&"\"&filename&""" -strip -profile USWebCoatedSWOP.icc -profile sRGB.icc -flatten -thumbnail 250 """&FilePath&"\thumbnails\"&newname&
I couldnt understand the command you sent me and how to enter it but I tried a few options and it created me 5 thumbnails one for each layer. What I want it to flatten it (all layers into 1) and create a thumbnail. They all result in the same issue each looking slightly different. Even when I did the one thumbnail for each layer, all of them had errors. I appreciate your suggestions...let me know if you have any other ideas.
Heres the command I used last:
convert image.psd -flatten -thumbnail 100 image.jpg
I have also tried adding profile rgb and resize instead of thumbnail
If this result is not what you are expecting, then I suspect you need to flatten the image in Photoshop first before exporting it to IM. IM (6.4.0.4) does not seem to be able to combine the frames in the way you expect. Or I do not know how to do that.
PSD images generally contain both a flattened version of the image and all its layers. Use the '[0]' form of the filename to just select the pre-flattened version of the image.
Wow that was the closest I have ever come and very acceptable. I thought Imagemagick treated layers the same as Photoshop but [0] must be a preview layer and not the 1st layer. I added -flatten to the command above and it is perfect! Thanks...final command:
one more question...if the file is an AI instead of a psd file do you think having [0] is ok or will I have to treat each differently? for example convert image.AI[0]
sorry, I don't know anything about AI files. You could post an example.
Also, just a comment, but if the first frame is already a flattened version, then you should not need to add -flatten to your IM command line. Does it really make a difference in the final image?