merrymonk has asked for the wisdom of the Perl Monks concerning the following question:

I think that this must be simple (if it is possible which I think it must be
from things I have found on various web sites).

I want to use Image:Magick to convert a pdf file to jpg with a better resolution than the standard 72 pixels per inch.
I have tried using (in spite of the fact that the book Graphics for Programming with Perl
by Verbruggen indicates you cannot do this)
$rc = $img->Set(density => '200'); $rc = $img->Read($pdf_file_full);

This does alter the Pixels per Inch but the picture is worse than when using the standard resolution value.
I have also tried using the Set after reading the image.
This does alter the resolution but the image is exactly the same as with the standard resolution setting.

Is there a Monk who knows how to do this?

Replies are listed 'Best First'.
Re: Image File Conversion Resolution using Image Magick
by zentara (Cardinal) on Jul 13, 2005 at 14:45 UTC
    It dosn't sound right to try "increase resolution" from a lower resolution image. Otherwise we could take low resolution photos, and programatically make them high resolution. The "physics" just isn't right. When you try to do it, the program has to guess at filling in the higher resolution points, and the result is it looks worse.

    I'm not really a human, but I play one on earth. flash japh
      Thanks for your reply. I appreciate the point you make.
      However, as I belevie that the pdf file is a
      vector orientated file, I was hoping that the restrictions
      you have to work with on pixel based files
      would not apply.
Re: Image File Conversion Resolution using Image Magick
by ww (Archbishop) on Jul 13, 2005 at 17:08 UTC
    Suggest (may be possible only if you're working on windows) you check whatever you normally use as a .pdf tool (full version of Acrobat, for ex, while big $$$) to change resolution BEFORE converting to .jpg or use a commercial graphics package which can appropriately resample and create a respectable version at a higher resolution.