Mogrify: Apply vs. Convert to Profile
Posted: 2017-01-19T21:12:29-07:00
I have installed ImageMagick on a Linux server hosting a WordPress site.
If I run the command
…will that apply/assign the profile or convert the image to that profile?
The docs seem to be confusing on this issue.
The top of http://www.imagemagick.org/script/mogrify.php says:
"Use the mogrify program to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. This tool is similar to convert except that the original image file is overwritten (unless you change the file suffix with the -format option) with any changes you request."
…which makes me think conversion.
But http://www.imagemagick.org/script/comma ... hp#profile says:
"Using -profile filename adds an ICM (ICC color management), IPTC (newswire information), or a generic profile to the image."
…which suggests assignment/application.
But then, this, from the same page, a couple paragraphs down:
"It is important to note that results may depend on whether or not the original image already has an included profile. Also, keep in mind that -profile is an "operator" (as opposed to a "setting") and therefore a conversion is made each time it is encountered, in order, in the command-line." (But it's unclear to me if this is alluding to the convert command, but not mogrify.)
Then there's this this, from http://www.imagemagick.org/script/mogrify.php, down at the -profile listing:
-profile filename add, delete, or apply an image profile
It does SEEM like it's doing an apply/assign action, but I'm not 100% sure.
Color me confused. I'm looking for a way to apply an sRGB profile to untagged images, via the command line, in Linux.
If I run the command
Code: Select all
mogrify -profile PATH/TO/sRGB.icm MY_TARGET_IMAGE
The docs seem to be confusing on this issue.
The top of http://www.imagemagick.org/script/mogrify.php says:
"Use the mogrify program to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. This tool is similar to convert except that the original image file is overwritten (unless you change the file suffix with the -format option) with any changes you request."
…which makes me think conversion.
But http://www.imagemagick.org/script/comma ... hp#profile says:
"Using -profile filename adds an ICM (ICC color management), IPTC (newswire information), or a generic profile to the image."
…which suggests assignment/application.
But then, this, from the same page, a couple paragraphs down:
"It is important to note that results may depend on whether or not the original image already has an included profile. Also, keep in mind that -profile is an "operator" (as opposed to a "setting") and therefore a conversion is made each time it is encountered, in order, in the command-line." (But it's unclear to me if this is alluding to the convert command, but not mogrify.)
Then there's this this, from http://www.imagemagick.org/script/mogrify.php, down at the -profile listing:
-profile filename add, delete, or apply an image profile
It does SEEM like it's doing an apply/assign action, but I'm not 100% sure.
Color me confused. I'm looking for a way to apply an sRGB profile to untagged images, via the command line, in Linux.