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
May 2005

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

2005.05.25 09:52 "Jpeg and YCbCr", by Kelvin Zhong
2005.05.25 10:41 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.26 01:50 "Re: Jpeg and YCbCr", by Kelvin Zhong
2005.05.26 08:37 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.26 10:02 "Re: Jpeg and YCbCr", by Kelvin Zhong
2005.05.26 12:24 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.26 13:03 "Re: Jpeg and YCbCr", by Joris Van Damme
2005.05.26 14:10 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.26 16:23 "Re: Jpeg and YCbCr", by Joris Van Damme
2005.05.26 16:50 "Re: Jpeg and YCbCr", by Bob Friesenhahn
2005.05.26 17:00 "Re: Jpeg and YCbCr", by Joris Van Damme
2005.05.26 19:30 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.26 19:34 "Re: Jpeg and YCbCr", by Bob Friesenhahn
2005.05.26 19:41 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.26 19:38 "Re: Jpeg and YCbCr", by Chris Losinger
2005.05.26 19:43 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.26 19:48 "Re: Jpeg and YCbCr", by Bob Friesenhahn
2005.05.28 18:01 "Re: Jpeg and YCbCr", by Joris Van Damme
2005.05.30 09:42 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.30 10:31 "Re: Jpeg and YCbCr", by Marti Maria
2005.05.30 13:04 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant
2005.05.30 14:39 "Re: Jpeg and YCbCr", by Marti Maria
2005.05.31 18:36 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.31 18:35 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.31 18:54 "Re: Jpeg and YCbCr", by Bob Friesenhahn
2005.05.31 19:00 "Re: Jpeg and YCbCr", by Chris Cox
2005.05.26 08:58 "Re: Jpeg and YCbCr", by Kelvin Zhong
2005.05.26 10:10 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant

2005.05.26 08:37 "Re: Jpeg and YCbCr", by Jean-yves Le Ridant

Hello yourpattern,

> I have already done the things like you said,comment the
> TIFFSetFiled(m_tif,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB)...,but
> still doesn't work.

Hum ..., what I said was *un*comment this line.
JPEGCOLORMODE_RGB must be understood from "jpeg compressor point of
view', not exactly standard but a common practice, baseline, ....
of converting RGB to YCC.
In clear, with this flag, RGB is automatically converted to/from YCC.

> then i use my code to read this pic, 
> and save it with compression = COMPRESSION_JPEG & photometric = PHOTOMETRIC_YCBCR
> with tiffdump,i saw follows:(FILE 2)
> Magic: 0x4949 <little-endian> Version: 0x2a
> Directory 0: offset 19642 (0x4cba) next 0 (0)
> ImageWidth (256) SHORT (3) 1<422>
> ImageLength (257) SHORT (3) 1<158>
> ...
> After doing some comparing things,i found almost every tag is same.
> except for the StripBytesCounts ,and the file i created has one tag RowsPerStrip 
> which the file ACDSEE created didn't have.
> but this file(i created) still can't be opened by ACDSEE5.

Seems like if ACDSEE don't want stripped files .... :-(((
This dump is consistant with JPEGCOLORMODE_RAW and PHOTOMETRIC_YCBCR,
if you have set somewhere YCBCRSUBSAMPLING to 1,1.

What I do not understand is why tiffdump "UNDEFINE" à well formed
JPEGTABLE field. ( 2 fields, so there also, consistant with a JCS_YCC).

> I opened this file(I created,file 2) in LeadTools ,the image color seems changed a 
> lot. so i modify the Photometric tag value from 6 to 2,(PHOTOMETRIC_YCBCR =6,& 
> PHOTOMETRIC_RGB=2),this time the color seemed right.(in Leadtools,ACDSEE can't 
> open it).

Such practice may produce hasardous results, cause of possible
traitements by the a jpeg decompressor of fields infos in the jpeg stream.
When you do this, your file is "basically" incorrect.
If photometric is something else than YCBCR, the infos in jpeg stream
must reflect an "unknown" colorspace.

--
Jean-Yves