Page 1 of 1

Imagemagic convert producing wrong size image

Posted: 2009-10-21T15:37:18-07:00
by undertruck
Hi,

I've a one page PDf file named file.pdf, which has an image embedded in it. This 354x591 image was built with 300 DPI in Photoshop. Print size of the the document is 1.18 inch x 1.97 inch. Which is correct because 354/300 = 1.18 and 591/300 = 1.97.

Now problem is when I run
convert file.pdf file.jpg
, file.jpg is produced with 85x142 dimensions. Shouldn't the image be saved as 354x591, which was the original size in PDF?

I've tried it with all the switches like density, size, geometry and resize but in all cases, image is 85x142. I think the reason is while is producing image it is calculating pixel size from print size 1.18 inch x 1.97 inch with 72 DPI (1.18x72 = 85, 1.97x72=142). So it seems it's doing wrong calculation. Is it a known bug?

Could someone please help me on this?

Re: Imagemagic convert producing wrong size image

Posted: 2009-10-21T16:29:49-07:00
by undertruck
I got it working. combination of density and resize switches gave me desired output. But default convert should have produced the same result as well. I'm not sure if that's the way it is supposed to work.

Re: Imagemagic convert producing wrong size image

Posted: 2009-10-21T20:31:26-07:00
by anthony
I would love to be able to extract raster images from PDf files (or psotscript files) in a 1:1 pixel to pixel manner. However both these file formats are designed to be resolution independent, even though a raster image contained within them may have a specific 'preferred' resolution or density.

The result is that currently their is no way to extract the raster images from such files 'perfectly'. I would love to find a way to do so, but currently this is not possible, except by trial and error.

I would love to hear from anyone that can prove me wrong!