multipage pdf to multipage tiff: severe quality issues

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Add a -density before reading the PDF file to define the number of points per inch to use.

See IM Examples on Postscript uses the same settings..
http://www.cit.gu.edu.au/~anthony/graph ... postscript
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Post by glennrp »

bwm_twg wrote: This did the trick, although the filesizes are HUGE. To convert a 64k pdf to a readable tiff (196; at 144 and below it started to become fuzzy in the text) produced a 10meg+ file...

If the original is black-and-white you don't need a lot of gray levels in
the output. Also you can reduce the image dimensions after rendering
the pdf:
  • convert -density 300 in.pdf -resize 25% -colors 8 out.tiff
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Remember that PDF and Postscript is a vector (lines, text, and objects) language, and often vectors are a lot smaller than the equivelent in a raster (array of pixels) image. Unless the original document is outputing a raster image, I would expect the result to be bigger.

Glenn though is right if you don't need the detail you can reduce the number of colors, and quality levels to match, as well as the final size of the image.

Using a high density with a resize afterward is a anti-aliasing method to improved the look of edges of the drawn objects.

Just remember
A picture may be worth a thousand words,
but a thousand words use a lot less disk space!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply