> And this works fine to me...

Ok, I will have to give it another try then. 

> just as example, libtiff site 
> has a sample of non subsampled
> YCbCr TIFF that can be handled by tifficc 
> ftp://ftp.remotesensing.org/pub/libtiff/ycbcrbug11.tif

The image I was testing with was actually a subsampled test image from libtiff:

http://remotesensing.org/cgi-bin/cvsweb.cgi/osrs/libtiffpic/quad-jpeg.tif

tifficc does not read it, but ImageMagick does. The strange thing is, converting among 
Gray, RGB, and CMYK profiles works fine with ImageMagick, but anything involving the 
YCC709.icm profile fails, giving wrong colors in the output image. I'm very confident 
the code is ok (like I said, it works when converting among gray, RGB, and CMYK 
colors), it simply converts one pixel at a time like this:

      struct Pixel
      {
        unsigned char r,g,b;
      } alpha, beta;

      alpha.r = 0;
      alpha.g = 0;
      alpha.b = 0;

      beta.r = 0;
      beta.g = 0;
      beta.b = 0;

      cmsDoTransform(hXForm, &alpha, &beta, 1);

- if alpha is (0,0,0) before the call to cmsDoTransform, beta is (15,91,0) after the 
call. And of course I made sure that the profile descriptors were correct (one byte 
per pixel component, correct colorspace, etc).

> YCbCr is not very standarized at all.

Could this be my problem?

> 
> What I do not undestand is why SWOP doesn't work... I'm using 
> CMYK conversions almost
> everyday without problems. Anyone else has experienced that?

Oh, but SWOP works beautifully, *except* with the YCC709.icm profile (fails just like 
sRGB colors). The problem, then, is with my code in ImageMagick (likely) or with LCMS 
handling of YCbCr profiles (unlikely, if it works for you).

> >
> >
> > /Current exch /ColorSpace defineresource pop
> 
> Yep, I did in such way because I needed in such way :-) but I 
> could try to make things easier. 
> Any suggestions?

Yes, it would be nice if it just returned the array [/CIEBasedDEFG .... ]. Any 
postscript code may easily be added by the application integrating LCMS.

Thanks for you replies.

/Lars


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to