Re: ImageMagick Mogrify: Apply vs. Convert to Profile
It turns out that my best solution was to install exiftool, which can embed a profile losslessly, and does not change the mod date either, using this command: exiftool "-icc_profile<=/PATH/TO/sRGB.icm" -overwrite_original TARGET_FILE --- The answer I got in the forum <http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=31264> was this:
Both mogrify and convert will add the profile to the image or convert from an existing profile to the new one. The image will be read, a new profile added and then the image with the profile will be written to the output, which could be the same as the input. But note, then image must be read. You cannot just include a profile with an image without reading the image first in IM. Perhaps some other tool would do this. If the image is JPG (lossy compression), then it will lose some quality being read and written again. Other formats that are not lossy compressed will show no affect in quality. But you must allow some time for reading and writing the image.
For only one image, use convert since it is more flexible than mogrify. For many images in a folder that all need the profile, you can use mogrify to process all the images in a folder using a wild card or you can write a script loop over all the images in the folder and use convert once for each image. The syntax for each is different. For mogrify, see http://www.imagemagick.org/Usage/basics/#mogrify << Rick Gordon -------------------- On 1/19/17, 6:44 PM Jeff Nova said:
I recommend asking on the IM discourse server. You'll likely get the definitive response quickly. I've only used this with the convert utility, never mogrify. I also always compile with LCMS2 and am not sure if that matters. They will know. Good luck! Please share your findings here!
Best, Jeff
___________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________ WWW: http://www.shelterpub.com
I would have suggested that, but I thought you were looking to convert to the profile space, not simply tag an image! Glad you found it! Jeff
On Jan 20, 2017, at 1:16 AM, Rick Gordon <lists@rickgordon.com> wrote:
It turns out that my best solution was to install exiftool, which can embed a profile losslessly, and does not change the mod date either, using this command:
exiftool "-icc_profile<=/PATH/TO/sRGB.icm" -overwrite_original TARGET_FILE
---
The answer I got in the forum <http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=31264> was this:
Both mogrify and convert will add the profile to the image or convert from an existing profile to the new one. The image will be read, a new profile added and then the image with the profile will be written to the output, which could be the same as the input. But note, then image must be read. You cannot just include a profile with an image without reading the image first in IM. Perhaps some other tool would do this. If the image is JPG (lossy compression), then it will lose some quality being read and written again. Other formats that are not lossy compressed will show no affect in quality. But you must allow some time for reading and writing the image.
For only one image, use convert since it is more flexible than mogrify. For many images in a folder that all need the profile, you can use mogrify to process all the images in a folder using a wild card or you can write a script loop over all the images in the folder and use convert once for each image.
The syntax for each is different.
For mogrify, see http://www.imagemagick.org/Usage/basics/#mogrify <<
Rick Gordon
-------------------- On 1/19/17, 6:44 PM Jeff Nova said:
I recommend asking on the IM discourse server. You'll likely get the definitive response quickly. I've only used this with the convert utility, never mogrify. I also always compile with LCMS2 and am not sure if that matters. They will know. Good luck! Please share your findings here!
Best, Jeff
___________________________________________ RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________ WWW: http://www.shelterpub.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Colorsync-users mailing list (Colorsync-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/colorsync-users/jnova%40colorhythm.c...
This email sent to jnova@colorhythm.com
-- Jeff NovaChief Executive OfficerColorhythm jnova@colorhythm.comMain: +1 415-399-9921Mobile:+1 510-710-9590Fax: +1 415-399-9928 1015 Battery Street, Suite CSan Francisco CA 94111http://colorhythm.com Please consider our environmentbefore printing this email Colorhythm is a certified Green Business:This electronic mail and the documents accompanying it are considered trade secret, confidential and/or proprietary by Colorhythm LLC. This information is intended for use by the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.
There are two common ways to do something to an image with a profile, embed vs match. Embed adds the profile to the image metadata without changing the pixel data. Match changes the pixel data and also embeds the profile. After doing an operation like this, you can determine which was done (match or embed) by deleting the profile from the image and viewing it, assuming you have a way to actually delete the profile.
participants (3)
-
Jeff Nova
-
John Gnaegy
-
Rick Gordon