Hello,
When I do the following on an RGB image:
convert image.png -colorspace HSL image_hsl.png (or with suffix .jpg, etc)
and then do
convert image_hsl.png -verbose info:
The colorspace is reported as RGB and not HSL.
I was wondering if it would be feasible to have IM store the correct colorspace in the image metadata that you use for IM generated images so that one could get access to the correct colorspace for the image. This would be very useful at least for me when doing some of my IM scripting.
Thanks for your condideration
Fred Weinhaus
fmw@alink.net
Possible enhancement to how colorspace is handled within IM
Re: Possible enhancement to how colorspace is handled within IM
The PNG standard does not permit colorspaces other than RGB/sRGB. If you can prove otherwise let us know.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible enhancement to how colorspace is handled within IM
The issue is not whether png or jpg or any other format can support other colorspaces. The issue is that IM can or should be able to record this information internally when it creates an image in some other colorspace and that information should be available for other IM processes to access. Whether or not it can be stored for export to other systems is a totally other matter.
Thanks.
Fred Weinhaus
Thanks.
Fred Weinhaus
Re: Possible enhancement to how colorspace is handled within IM
The PNG folks (Glenn) has responded that they can arrange for a new chunk to specify a colorspace. Once the format of the chunk is defined and it is part of the libPNG distribution we will enhance the ImageMagick PNG coder to save/fetch the colorspace chunk.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible enhancement to how colorspace is handled within IM
What about JPEG as well?
And is it a requirement that this be image format dependent and not just an internal IM notation in its meta data?
Thanks in any case no matter what you decide.
Fred Weinhaus
And is it a requirement that this be image format dependent and not just an internal IM notation in its meta data?
Thanks in any case no matter what you decide.
Fred Weinhaus
Re: Possible enhancement to how colorspace is handled within IM
JPEG supports RGB, Grayscale, and CMYK. If we store the colorspace metadata, where would we store it? Would any other software recognize the colorspace attribute or just ImageMagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Possible enhancement to how colorspace is handled within IM
My point is that IM should be able to handle it internally for its own scripting and proper reporting of the colorspace in -verbose info: If any other external image formats can support it, that is even better (a plus), but not a requirement.
Re: Possible enhancement to how colorspace is handled within IM
We recommend you use MIFF as an intermediate format. It supports *all* ImageMagick colorspaces, profiles and properties.