See here in the Users section: viewtopic.php?f=1&t=16752
Simple example:
Code: Select all
convert rose: rose.jpg
convert rose.jpg -density 123 roseb.jpg
identify -verbose roseb.jpg
Resolution: 72x72
If you need more details:
One problem is that "-density" doesn't work at all if specified after the input image (which was ok for many many versions), but only if specified before the input image. But the main problem is that it works only if the input doesn't has already a density value. So, at the moment one basically has to strip all the metadata or temporarily write the file to a format that can't store the density if one wants to change the density value.
This doesn't work:
Code: Select all
convert rose: TIFF:- | convert -density 123 - -format "%x x %y" info:-
But this works (as "-density 0" doesn't create the EXIF tags in this case):
Code: Select all
convert -density 0 rose: TIFF:- | convert -density 123 - -format "%x x %y" info:-
By the way: "-units" is affected, too. Up to version 6.6.1-4, specifying units and density after the input image simply changed these values. After version 6.6.1-5, specifying "-units" this way also converted the density value. (See here. Thanks again for that feature - it's working great!) But simply specifying units AND density after the input image (for a manual change) could result in wrong values then. No big problem so far, because one could specify the units value before the input image for a manual change. (But perhaps a hint to this could be added to the documentation.)
But now (version 6.6.3-1), even specifying it before the input image results in a conversion of the density value. So, it seems that a change of the units value alone is not possible anymore.