0

I'm converting pdf files to images with ImageMagic, everything is ok until I use -resize option, then I get image with black background. I use this command:

convert -density 400 image.pdf -resize 25% image.png

I need to use -resize option otherwise I get really large image. Is there any other option which I can use to resize image or is there option to set background in white.

Alen
  • 897
  • 2
  • 15
  • 33

2 Answers2

0

That's not a Ghostscript command, You will need to find out what convert is sending to Ghostscript. As it stands I can't even be sure that your problem is with Ghostscript ,since it could easily be something that convert is doing.

KenS
  • 30,202
  • 3
  • 34
  • 51
0

Solved it by removing alpha from image, it seems imagemagic tries to apply some opacity but since jpeg doesn't allow transperency result was black background. So I found example on imagemagic website and it helped me:

convert a.pdf   -background skyblue  -alpha remove -alpha off a_remove.jpg
Alen
  • 897
  • 2
  • 15
  • 33