Specifically: Pick a "standard" anchor space. (Actually, more than one is probably needed, to deal with alpha and things that don't fit like color separation, multi-band images etc. In addition, when working in 8-bit, it may be a good thing to specifically have an sRGB and a "linear" RGB anchor space, which are the same except for that when converting to/from other colourspaces shortcuts are taken. Allow me to ignore these complications.) My first choice would be linear RGB(A), but sRGB(A) v2 would be acceptable. (NIP2/VIPS uses XYZ through Lab variants but I don't think this is a good choice for IM. GEGL/babl uses linear light RGB(A).) I understand this does not cover all possibilities. Unless otherwise "informed", or the image just does not fit into RGB(A), IM7 will pretend that what you have is just that. In the following, I assume the anchor space is linear RGB(A).
To convert into linear RGB(A) (or something understood as linear RGB(A)) using an ICC/ICM/whatever profile:
Code: Select all
-import PROFILE_NAME or LOCATION
Code: Select all
-import embedded
Code: Select all
-import default
To convert out of linear RGB(A) using a profile:
Code: Select all
-export PROFILE_NAME
Code: Select all
-export embedded
Code: Select all
-import default
To convert to a different colorspace (default assumption being that it is from linear RGB(A), but otherwise going through linear RGB(A) to convert between the relevant pairs):
Code: Select all
-colorspace COLORSPACE_NAME
To "inform" IM7 that what is in the image belongs to some colorspace without doing any import/export/conversion:
Code: Select all
-tag COLORSPACE_NAME
No need to explain to me why you don't like this idea if you don't. I have not studied this issue carefully, and I'm not doing this to "win".