Page 1 of 1
How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-10T05:18:46-07:00
by yup
According to
http://www.imagemagick.org/script/montage.php the "montage" program supports a "-profile" option. And really, usage of this parameter does not produce any error messages. But it creates output file without embedded profile.
For example (simplest):
Code: Select all
montage a.jpg -profile a.icc a.tif
- produces "c.tif" that does not contain profile.
At the same time
Code: Select all
convert a.jpg -profile a.icc a.tif
- produces "c.tif" with embedded profile.
So, is documentation wrong, or am I missing something?
Re: How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-10T06:32:37-07:00
by snibgo
Please, always provide the IM version number.
From experiments with v6.9.2-5, it seems that montage can successfully convert an image to a profile, but it never embeds the profile in the output file. I think it should, and that this is a bug.
Worse, if in.jpg has an embedded profile, then
... will silently strip the profile.
Re: How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-10T10:33:18-07:00
by yup
snibgo wrote:Please, always provide the IM version number.
I tried v7.0.0-0, v6.9.3-7, and yet one release of v6.9.3 (can't tell its exact revision because it's on a computer at work).
snibgo wrote:Worse, if in.jpg has an embedded profile, then
... will silently strip the profile.
If I am not wrong, this behaviour is normal: while
convert uses its first source image as a base for output image, so output may silently inherit some attributes from this base (if it is a file),
montage always creates output image from scratch, and thus out.jpg has nothing to inherit.
snibgo wrote:From experiments with v6.9.2-5, it seems that montage can successfully convert an image to a profile, but it never embeds the profile in the output file. I think it should, and that this is a bug.
Should I report it on a corresponding forum?
Re: How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-10T10:50:53-07:00
by snibgo
You can post to the Bugs forum
viewforum.php?f=3 with a link to this thread.
I see what you mean about montage creating images from scratch. I don't use montage, so I don't really know what it does, or what it
should do, about colorspaces and profiles.
Re: How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-13T12:46:36-07:00
by fmw42
Until your get a reply from the developers whether -profile should work in montage (and I get error messages that seem to imply that it does not), then just pipe the output to convert to add the profile
Code: Select all
montage rose: rose: rose: -tile 3x1 miff:- | convert - -profile /Users/fred/images/profiles/sRGB.icc rose_montage.jpg
Code: Select all
identify -verbose rose_montage.jpg
Image: rose_montage.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 384x126+0+0
Units: Undefined
Type: TrueColor
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
...
Properties:
date:create: 2016-04-13T12:43:22-07:00
date:modify: 2016-04-13T12:43:22-07:00
icc sRGB built-in
icc:description: sRGB built-in
icc:manufacturer: (lcms internal)
icc:model: sRGB built-in
jpeg:colorspace: 2
jpeg:sampling-factor: 1x1,1x1,1x1
signature: ff93238d9e1cb70ac2d336a7ee87f4f415828694431a9254d46ddb4a9f56c8f4
Profiles:
Profile-icc: 6876 bytes
Re: How to embed an ICC profile into output file with the "montage" program?
Posted: 2016-04-13T16:30:58-07:00
by yup
fmw42 wrote:just pipe the output to convert to add the profile
Code: Select all
montage rose: rose: rose: -tile 3x1 miff:- | convert - -profile /Users/fred/images/profiles/sRGB.icc rose_montage.jpg
This is almost exactly what I do. "Almost" - because I create very large files (typically 8-10 GB for LZW-compressed tiff64 output), and under Windows pipe is not very effective (uses an intermediate temporary file), so in this case I prefer to create such file explicitly.