If I have a TIFF or PSD with an ICC profile embedded and `convert` the file to a PNG, the ICC profile doesn't come with it. In fact, it looks like the sRGB chunk is getting set when it shouldn't (my source file has the Adobe RGB profile).
A harder problem is hoping to get other metadata into the PNG. The TIFF has IPTC metadata, which is not supported by PNG. Ditto with EXIF. It is theoretically possible to convert IPTC or EXIF into XMP, which can be embedded in a PNG tEXt chunk, but I assume ImageMagick doesn't have any code to do that at present.
Version: ImageMagick 6.7.9-6 2012-09-15
Platform: OS X 10.6.8
cmd: convert P1000423.tif P1000423.png
ICC Profiles not copied to PNGs
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ICC Profiles not copied to PNGs
You need to upgrade to a current version of IM. Your version is almost 100 versions old.
I saved a picture in PS with Adobe icc profile as both tif and psd. Then converted each to PNG. The PNG file in both case contained lots of meta data and the Adobe profile.
I am using IM 6.8.8.10 Q16 Mac OSX Snow Leopard.
I saved a picture in PS with Adobe icc profile as both tif and psd. Then converted each to PNG. The PNG file in both case contained lots of meta data and the Adobe profile.
I am using IM 6.8.8.10 Q16 Mac OSX Snow Leopard.
Re: ICC Profiles not copied to PNGs
Yep, you're right. I updated and now the ICC profile comes through.Thanks!
I see a bunch of other metadata as well, all broken up into many separate tEXt chunks. And then there's some sort of zTXt "Raw profile type xmp" . What ImageMagick doesn't do is embed all the XMP in one iTXt called "XML:com.adobe.xmp" as it says to do in this document.
I see a bunch of other metadata as well, all broken up into many separate tEXt chunks. And then there's some sort of zTXt "Raw profile type xmp" . What ImageMagick doesn't do is embed all the XMP in one iTXt called "XML:com.adobe.xmp" as it says to do in this document.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ICC Profiles not copied to PNGs
That would be a question for the IM PNG developer, glennrp.
Re: ICC Profiles not copied to PNGs
One more thing: I'm not sure what to do with that raw XMP zTXt chunk. XMP should be human-readable, but that chunk in the files I'm getting from ImageMagick is noise. I'm pretty sure I'm looking at decompressed data.
But like I said, if XMP is to be included (and I'd like it to be), Adobe has the spec for doing so.
But like I said, if XMP is to be included (and I'd like it to be), Adobe has the spec for doing so.
Re: ICC Profiles not copied to PNGs
The zTXt chunk contains compressed text. Did you decompress it before looking at it?fnordware wrote:One more thing: I'm not sure what to do with that raw XMP zTXt chunk. XMP should be human-readable, but that chunk in the files I'm getting from ImageMagick is noise.
Re: ICC Profiles not copied to PNGs
glennrp wrote:The zTXt chunk contains compressed text. Did you decompress it before looking at it?fnordware wrote:One more thing: I'm not sure what to do with that raw XMP zTXt chunk. XMP should be human-readable, but that chunk in the files I'm getting from ImageMagick is noise.
Doesn't libpng do it for me? It doesn't look like zlib compression. In text form it looks like:
Code: Select all
.xmp. 21528.3c3f787061636b657420626567696e3d22efbbbf22206964...
Re: ICC Profiles not copied to PNGs
[quote="fnordware"]
Doesn't libpng do it for me? It doesn't look like zlib compression. In text form it looks like:
I guess it's HEX-encoded. I know the ICC profiles are. Not sure why ImageMagick isn't
reversing that on decode. I'll have a look. (If you are extracting the zTXt chunk with some
other application, then it'll still be HEX-encoded).
Doesn't libpng do it for me? It doesn't look like zlib compression. In text form it looks like:
Code: Select all
.xmp. 21528.3c3f787061636b657420626567696e3d22efbbbf22206964...
reversing that on decode. I'll have a look. (If you are extracting the zTXt chunk with some
other application, then it'll still be HEX-encoded).