Imagemagick convert pdf with transparency in jpg

When converting PDF with images with transparency, the output ends with a black background

convert -density 300 -background white -alpha off \ -resize 80x80 -strip -quality 70 file.pdf[0] thumb.jpg[0] 

Tried to set the background color to white and deactivate alpha, but the background still ends in black !?

Test file

http://www.bluemachines.dk/pdf/trans.pdf

Tested on these two versions, so it looks like a β€œproblem”

ImageMagick-6.8.8-10

ImageMagick-6.7.7-10

Update

 # /var/bin/ImageMagick-6.8.8-10/utilities/convert Version: ImageMagick 6.8.8-10 Q16 x86_64 2014-04-10 # gs -v GPL Ghostscript 9.14 (2014-03-26) 

Here is the output file

http://www.bluemachines.dk/pdf/thumb.jpg

-debug ALL

It is not possible to publish this in the body so that the output is inserted into this txt file

http://www.bluemachines.dk/pdf/debug.txt

+6
source share
1 answer

You should use -alpha remove instead of -alpha off. And I would advise you to reorder your arguments:

 convert -density 300 file.pdf[0] -resize 80x80 -background white -alpha remove \ -strip -quality 70 thumb.jpg 
+16
source

All Articles