Topic: https://brettterpstra.com/2012/09/26/png-to-jpeg-and-how-i-loathe-imagemagick-options/
hide preview

What's next? verify your email address for reply notifications!

Lauri Ranta 12y, 174d ago

I've just used something like convert -flatten -quality 95 file.png file.jpg. (Without -flatten the background color would be black.)

Why do you need the -background white or +matte options?

+matte makes this image solid red: convert -size 200x200 'xc:rgba(255,0,0,0.5)' square.png. According to the documentation, it's the same as -alpha off, which turns off the use of alpha channel data. But doesn't -mosaic remove transparency?

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 12y, 174d ago

In images that had varying levels of transparency, such as gradated drop shadows, I had horrible results until I got to the command above.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Lauri Ranta 12y, 174d ago

I don't see any difference as long as -flatten (or -mosaic) is before the other options.

hide preview

What's next? verify your email address for reply notifications!