AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
December 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.12.10 18:28 "YCbCr", by Steve Mills
2009.12.10 19:19 "Re: YCbCr", by Joris Van Damme
2009.12.10 19:37 "Re: YCbCr", by Steve Mills
2009.12.10 20:21 "Re: YCbCr", by Antonio Scuri
2009.12.10 20:31 "Re: YCbCr", by Steve Mills
2009.12.11 16:15 "Re: YCbCr", by Antonio Scuri
2009.12.11 16:58 "Re: YCbCr", by Steve Mills
2009.12.11 18:37 "Re: YCbCr", by Antonio Scuri
2009.12.11 19:11 "Re: YCbCr", by Gene Amtower
2009.12.11 19:22 "Re: YCbCr", by Steve Mills
2009.12.11 20:04 "Re: YCbCr", by Gene Amtower
2009.12.12 02:37 "Re: YCbCr", by Antonio Scuri
2009.12.12 16:37 "Re: YCbCr", by Gene Amtower
2009.12.12 17:34 "Re: YCbCr", by Toby Thain
2009.12.12 18:19 "Re: YCbCr", by Bob Friesenhahn
2009.12.12 18:27 "Re: YCbCr", by Antonio Scuri
2009.12.10 20:32 "Re: YCbCr", by Joris Van Damme
2009.12.10 20:55 "Re: YCbCr", by Steve Mills
2009.12.10 22:31 "Re: YCbCr", by Steve Mills

2009.12.10 20:32 "Re: YCbCr", by Joris Van Damme

Steve,

>> Are you using the JPEG_COLORMODE pseudo-tag?
>
> No. But I just added this call right after our call to TIFFClientOpen and 
> it worked!
>
> TIFFSetField(m_TIFF, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
>
> Is that the correct way to handle this?

It does, in the sense that it is LibTiff's wrong way to try and support the 
result that you're after in this particular case. Do thorough testing, and 
if it works for you, it works for you.

So, what you were getting was not channel-order-inversed RGB, but YCbCr, 
actually. And that is what the Photometric said you'd get. Only if the 
Photometric is YCbCr, and the compression is JPEG, can you suddenly turn 
this into RGB by using this magical out-of-the-blue pseudo-tag. But you'll 
have to remember to have your code thoroughly check for these conditions, 
and use the magical pseudo-tag.


Best regards,

Joris