I know that this has been addressed before, but I cannot find a solution for my issue. I am running Fedora 16, recently upgraded from F14. While in F14 I could sucuessfully convert any pdf to a jpg with this simple line
convert -geometry 1600x1600 -density 200x200 -quality 100 file.pdf file.jpg
now, no mater which pdf I try, i get a black background. I have tried to set the background to white, no luck. I have tried to convert to a png and I get a white background) but then when I go png->jpg, the black comes back. I have tried to remove alpha with this
convert test.png -background white -alpha remove alpha_remove.png
and I get an error
convert: UnrecognizedAlphaChannelType `remove' @ error/convert.c/ConvertImageCommand/657.
Any thoughts?
Thank you
Pdf->jpg black background [SOLVED]
Pdf->jpg black background [SOLVED]
Last edited by Jacob K. on 2012-09-07T01:02:43-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Pdf->jpg black background
What version of IM do you now have on your new system and what did you have on your old system? Sounds like it might have reverted to a very old version of IM.
Re: Pdf->jpg black background
I do not know what I had on F14.
now i have
Version: ImageMagick 6.7.0-10 2012-08-11 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
now i have
Version: ImageMagick 6.7.0-10 2012-08-11 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Pdf->jpg black background
-alpha remove was only added at IMv6.7.5 see http://www.imagemagick.org/Usage/masking/#alpha_removeJacob K. wrote:I do not know what I had on F14.
now i have
Version: ImageMagick 6.7.0-10 2012-08-11 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
I am not sure that -geometry does anything here. It is a setting that has in your example no operator to use it. Though there are some strange uses of -geometry. So I am not totally sure here. See http://www.imagemagick.org/script/comma ... p#geometry and http://www.imagemagick.org/Usage/resize/#geometryconvert -geometry 1600x1600 -density 200x200 -quality 100 file.pdf file.jpg
Also -quality should be set after reading the pdf and before writing the jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Pdf->jpg black background
Nope geometry is not used here, and in fact may interfere as it is a partical operator in some condintions (resize).
Even if it is needed I would avoid its 'resize' feature, and in the above example may produce a 'no image to resize' error, in IMv7. (whcih will never 'save' operators for for later use).
Even if it is needed I would avoid its 'resize' feature, and in the above example may produce a 'no image to resize' error, in IMv7. (whcih will never 'save' operators for for later use).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Pdf->jpg black background
Thank you
convert -density 200x200 test.pdf -quality 100 file.jpg
works perfectly
convert -density 200x200 test.pdf -quality 100 file.jpg
works perfectly