flatten to remove transparency not working

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
Posts: 5
Joined: 2018-06-28T15:02:22-07:00
Authentication code: 1152

flatten to remove transparency not working

Post by kiranbg123@gmail.com » 2018-07-12T18:03:09-07:00

convert test.png -flatten -background white convertTest.jpg is not working with image magick. It works for most of the images but doesnt work for certain images.
It messes up the image after converting. Is this known issue with IM?

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

Re: flatten to remove transparency not working

Post by fmw42 » 2018-07-12T18:31:59-07:00

Please always provide your Imagemagick version and platform. Also post an example image that does not work. If using IM 7, then use magick rather than convert.

When flattening, put -background white before -flatten. Proper order is important for IM 7, but IM 6 is more forgiving.

Post Reply