resize vs. resample to retain print size

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
cesarcesar

resize vs. resample to retain print size

Post by cesarcesar »

hello all, I'm new to IM and am having quite a time getting my parameters strait. I have a JPG (sometimes will be a TIFF) with the following parameters.

test.jpg
Pixel Dimensions - 3296*2550
Document Size - 10.987*8.5 inches
Resolution - 300 px/in
File Size - 811kb

I want to reduce the image so that the dimensions are around 800*600, without changing the print size. (Final image will be embedded into a PDF full size on one page.) I have tried various attempts using both -resize and -resample with various -density and -units. My end result is either a document that has a 2" print size, 2Megs, or 3000+ px dimension. Can someone please send me in the right direction.

Just to note, I am not interested in making a PDF from the image.

Thanks much.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: resize vs. resample to retain print size

Post by anthony »

This is tricky and will involve some math on your part.

The various resize operators just resize the image in terms of pixels.
It does not change the image density or resolution to preserve its real world size.

The resample operator also resizes the image but in terms of changing the density of pixels, whicl preserving the images real work size.

So you have a choice. resize the image in pixels, and set the right density yourself.

Or resample the image giving the images final density.

Either way you need to calculate the images final density for a 800x600 pixel image
at the size desired!!!

Remember denaity is just a data field defining number of pixels to real world units, it has nothing to do with the actual pixel size of the image itself.

I suggest you just resize, THE set density until you get the size you want in real world units.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
cesarcesar

Re: resize vs. resample to retain print size

Post by cesarcesar »

thanks for the reply. i found that my error was not really an issue. when printing from a web page, the image is the size i need. I was foolishly testing printing from just the image file and not its intended final output.
Post Reply