문제

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.

도움이 되었습니까?

해결책 2

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top