Getting low quality :(

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
victorzimmer
Posts: 2
Joined: 2012-09-11T12:24:02-07:00
Authentication code: 67789

Getting low quality :(

Post by victorzimmer »

I'm trying to convert from pdf to tiff (with Group4 compression) using ImageMagick command line.
However when i do "convert test.pdf -compress Group4 -density 300 test.tiff" I get a very low quality tiff image :(

The test.pdf do have the right quality!
Is there a reason why I get such low quality?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Getting low quality :(

Post by Bonzo »

Try adding a -density before the pdf:

Code: Select all

convert -density 300 test.pdf -compress Group4 -density 300 test.tiff
I do not know if you need the -density 300 before the test.tiff
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Getting low quality :(

Post by anthony »

You don't need it before writing the tiff. But it does not hurt either.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
victorzimmer
Posts: 2
Joined: 2012-09-11T12:24:02-07:00
Authentication code: 67789

Re: Getting low quality :(

Post by victorzimmer »

That worked, thank you :) I taught I'd -density, but seemingly it worked now :P
The file size however is now larger than the maximum for this application :P
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting low quality :(

Post by fmw42 »

victorzimmer wrote:That worked, thank you :) I taught I'd -density, but seemingly it worked now :P
The file size however is now larger than the maximum for this application :P

Make the density smaller.

OR:

You can use supersampling to get higher quality and reduce the image dimensions.

try

convert -density 288 test.pdf -resize 25% -compress Group4 test.tiff

nominal density is 72
density=288=72*4
resize by 1/4=25%
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Getting low quality :(

Post by anthony »

fmw42 wrote:You can use supersampling to get higher quality and reduce the image dimensions.

convert -density 288 test.pdf -resize 25% -compress Group4 test.tiff
NOTE this will result in an incorrect density! -resize ignored density. So after a resize you do need to reset teh density (if that is important to you).

Alternativally resize using density using -resample
convert -density 288 test.pdf -resample 72 -compress Group4 test.tiff

See IM Example, Image resizing, Resample
http://www.imagemagick.org/Usage/resize/#resample
And PS and PDF supersizing
http://www.imagemagick.org/Usage/text/#postscript
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply