>Marti wrote:
>You are assuming that to do a color transform, both input and output
>profiles have to be of same colorspace, but that's not true.

For the file:
file7.jp2: color-space(RGB ) profile-connection-space(XYZ )
          16-bit e-sRGB JP2 restricted (to sRGB) profile)

I coded:

   inprof = cmsOpenProfileFromMem(jp2_profile_buf, jp2_profile_len);
   outprof = cmsCreate_sRGBProfile();
   inspace = cmsGetPCS(inprof);
   outspace = cmsGetColorSpace(outprof);

As the inspace is (XYZ ) and the outspace is (RGB ), I supposed I
I had to write:

   transform = cmsCreateTransform(in_prof, TYPE_XYZ_16,
     out_prof, TYPE_RGB_16, intent, 0);

But I got no transform. I had to change the code to:

   transform = cmsCreateTransform(in_prof, TYPE_RGB_16,
     out_prof, TYPE_RGB_16, intent, 0);

>Incidentally, there is indeed a cmsCreate_GrayProfile()
I meant a parameterless one like cmsCreate_sRGBProfile().

Because I do not know how to transform the third file, file8.jp2:
-------------- ICC Profile[414] ---------------
cmmtype(0) version(2.32.0.0) class(scnr)
color-space(GRAY) profile-connection-space(XYZ )
date(23.1.2002) time(9:26:16)
signature(acsp) platform-signature()
profile-flags(0x1) [0]1 [1]0 [2:15]0
device-attr(0) white(0) negative(0) matte(0) transparent(0)
rendering-intent(0)
CIE: x(0.63190) y(1.0) z(0.54061)
[0]signature(desc) size[154]
  Restricted ICC profile describing greyscale version of ROMM-RGB
[1]signature(cprt) size[42]
  Copyright 2001 EKC-RICC Reference
[2]signature(wtpt) size[20]
  XYZ(0.214, 0.214, 0.214)
[3]signature(kTRC) size[14]
  curv size[1]
    curv[0]gamma(1.205)
-----------------------------------------------
There is only one channel. I have no 'outprof'.

The two other images, using lcms-2.0, now look enchanting.

winfried

Und was machen Sie heute abend? Alles Events Ihrer Gegend auf einen Blick im 
Arcor.de-Veranstaltungskalender: http://www.arcor.de/rd/footer.events

------------------------------------------------------------------------------

_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to