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
June 2010

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

2010.06.11 21:39 "Class Y images with alpha channels", by Thomas Richter
2010.06.11 23:26 "Re: Class Y images with alpha channels", by Bob Friesenhahn
2010.06.14 05:59 "Re: Class Y images with alpha channels", by Joris Van Damme
2010.06.14 06:36 "Re: Class Y images with alpha channels", by Thomas Richter
2010.06.14 07:51 "Re: Class Y images with alpha channels", by Joris Van Damme
2010.06.14 14:57 "Re: Class Y images with alpha channels", by Bob Friesenhahn

2010.06.14 06:36 "Re: Class Y images with alpha channels", by Thomas Richter

Joris Van Damme (AWare Systems) schrieb:
> Thomas,
>
>> is there a possibility to add an alpha channel to a class Y (YCbCr) tiff
>> image? I don't see this in the rev.6 specs.
>
> Nor does the spec mention 12 bit per channel YCbCr, nor does the spec 
> mention RGB with alpha and two unspecified channels, nor does it 
> mention 20 bit per channel grayscale, etc. We ought to understand the 
> 'class' concept in the spec as a (misleading) enumeration of 'typical 
> usage', whilst the tag system makes perfect sense as to allow just any 
> variation. 
Well, but then how it's done if it is not specified?

Here are two concrete questions I cannot answer from the specs:

*) Given by bits/component is not divisible by 8, how do I pack the 
samples? Given my understanding of the "RGB" class, I suppose I need to 
bit-pack the samples
as tightly as possible, that is, if I have a 9 bit YCbCr (let's assume 
this for a moment) with 420 subsampling, then I write 9 bits Y, 9 bits 
Y, 9 bits Y, 9 bits Y, 9 bits Cb,
9 bits Cr, making a total of 6*9 = 54 bits. Now, the specs furthermore 
say that I need to flush to the end of the byte at the end of a row. 
What is the end of the row
here exactly? Actually, I'm writing not a single row, but two rows at 
once. I suppose I need to flush at the end of the "row pair" in 420?

*) Given I have an alpha channel, how is it interleaved with the 
remaining channels? Is the alpha channel subsampled (I suppose not, but 
I don't know). Is it
YYYYCbCrAAAA or is it YYYYAAAACbCr, or YYYYCbCrA?

Again, no information or examples from the specs.

So long,
    Thomas