PDF -> Jpg Bad results

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
PCPete

PDF -> Jpg Bad results

Post by PCPete »

I tried this with the Com object first, but have been working strait through the command line and can not get a clean conversion from PDF - Jpg. I create a 300dpi, 500x500 red square with "TEST" in white letters across it, in photoshop. I saved this as a flattened PDF with no compression.

Code: Select all

-convert -quality 100 test.pdf test.jpg
Creates the jpg but it looks terrible. Wrong size, wrong dpi, terrible quality. I read something about how a pdf is really resolution independent, that probably factors into this. But no amount of -resample or -resize fixes the image. Is there anything I can do to correctly output the size and resolution, or at least correct the quality?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PDF -> Jpg Bad results

Post by magick »

Try this command:
  • convert -density 400 test.pdf -resize 25% -quality 100 test.jpg
PCPete

Re: PDF -> Jpg Bad results

Post by PCPete »

I modified your command a little (there always seems to be a slight difference when working in ASP than from the command line) and came up with

objIM.convert("-density","300","-depth","100",imgPath, Server.MapPath("display/new_rgb.jpg"))

And it works perfectly. thank you!
Post Reply