I use Imagemagick to create thumbnail images of PDF files with this command:
convert 'input.pdf[0]' -resize "100x140>" -colorspace 'rgb' 'output.jpg' 2>/dev/null
Some of the PDF files are in the CMYK color space, so the specification of the expected color space is rgb. This worked fine until I upgraded to the latest versions of Imagemagick (6.6.7-1) and ghostscript (9.01_0), now it looks like the conversion to rgb no longer works, here is an example output:

(The background should be white, not black) It seems that the problem arises from the -resize option, because if I remove it, the result will be correct.
To get the expected result, I make two passes, the first to convert to rgb, and the second to resize the image, but it's not very elegant. Is there a better solution?
source share