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?".
My problem with -resize is that it will keep the ppi of the output unchanged, resulting in the output image and the input image having different physical sizes (fewer pixels at the same ppi produce shorter physical distances). When I resize an image, most of the time, I want to keep its printed size unchanged and thus reduce both its number of pixels and its ppi values stored in its metadata.
That same page introduces -resample, stating that:
"-resample" is also a simple wrapper around the normal "-resize" operator.
But then again, -resample wants a ppi value as parameter, while I want to resize based on a certain Pixel Count Limit. I want to give "convert" that pixel count limit, and have it calculate itself the new ppi value it has to store into the output file so that its physical size remains unchanged.
although IMHO it is pretty ridiculous that I have to go through these hoops to get a resized image while keeping its physical size intact.
And this is not even a solution, as for whatever reason, identify and convert will be reading/writing the ppi from/in the JPEG header, but if the input image also has the proprietary ppi fields that Photoshop uses, convert will copy them unto the output image. As a result, even if one took the effort to calculate and embed the ppi that the output image should have, Photoshop will not give a damn and still use the ppi of the original image.
Is there a way to have convert overwrite Photoshop's proprietary ppi fields when using -density?
Last edited by elmimmo on 2013-11-13T09:21:21-07:00, edited 1 time in total.
Just to answer to myself: apparently the options are to keep all metadata of the input image or none of it (adding the option -strip; unless one wants to rely on an extra tool like exiftool to be able to target metadata more granularly), in which case Photoshop will read the ppi resolution that convert stored in the JPEG header.