How to change resolution without resampling an image ?

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
batmax2

How to change resolution without resampling an image ?

Post by batmax2 »

Suppose, I have to change resolution of an image file from 300dpi to 600dpi and "print size" of that image must shrink exactly twice. No interpolation needed!
How can one do that with ImageMagick ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to change resolution without resampling an image ?

Post by anthony »

use -density AFTER reading the image and before writing the image.

Hmmm prehaps that should be -set density
Not sure. Some programs ignore the normal image density setting, and only use density setting provided by profile info. photoshop comes to mind for this!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
batmax2

Re: How to change resolution without resampling an image ?

Post by batmax2 »

Yes, Antony, y're right. And why option -density does not work correctly, i.e. with these special profiles ? That's another question to IM authors...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to change resolution without resampling an image ?

Post by anthony »

The problem is I believe is lack of information on the photoshop metadata profile.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply