PDF to TIF - Poor quaility

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
oddball508

PDF to TIF - Poor quaility

Post by oddball508 »

I can convert a PDF to TIF with vbscript now that I have the current versions of Imagemagick and GhostScript loaded. But the quality is very poor. The PDF is of a scan of text and is clear, but the convert TIF file has less than half the image quality. Any sugestions?

Code:
Sub Main
Set img = CreateObject("ImageMagickObject.MagickImage.1")
img.convert "-size", "3507x4820", strFilename, Replace(strFilename,".pdf",".tif")
Set img = Nothing
End Sub
oddball508

Post by oddball508 »

Any ideas, anyone? It seems there is no way to control the read resolution.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

To render PDF, set the -density option to 400x400 before the input image filename. After the input image filename resize the image with -resize 25%.
oddball508

Post by oddball508 »

:D
Many, many thanks - excellent solution
_Mr_E
Posts: 2
Joined: 2011-03-28T08:17:17-07:00
Authentication code: 8675308

Re: PDF to TIF - Poor quaility

Post by _Mr_E »

Is this the only option? This seems to make the process take much longer and the quality still isn't great.
I had used a purchased package at my last company and it was able to convert pdf to tiff very quickly, the quality was quite high, and the filesize was smaller. I understand ImageMagick is free so I can't really complain but why does it seem pretty bad at pdf to tif?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF to TIF - Poor quaility

Post by fmw42 »

IM is a general image processing system and not tuned to do any one thing the best in the world. So your choices are to use IM and its limitations or find a special purpose processor that does just what you want in an optimal manner.

IM relies upon ghostscript for PDF handling and libtiff for tiff handling. So I do not know that there is anything that IM developers can do. But I will defer that to the IM developers.

The supersampling method is slow, but produces the best results. You just need to choose the factor that gives the best times vs quality.

I usually use 4*72(dpi)=288 for density and a resize of 25%

convert -density 288 image.pdf -resize 25% image.tiff

tiff has a few parameters you can adjust. see http://www.imagemagick.org/Usage/formats/#tiff. You can also try a different PDF device, by editing the delegates.xml file.

Also if you are on a multiprocessor system, then try enabling OpenMP in the IM ./configure command

You might also try upgrading ghostscript and libtiff.
Post Reply