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
November 2003

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

2003.11.17 20:04 "TIFF JPEG and Upsampling", by Antonio Scuri
2003.11.18 00:19 "TIFF JPEG and Upsampling", by Ross Finlayson

2003.11.17 20:04 "TIFF JPEG and Upsampling", by Antonio Scuri

Hi,

I´m using LibTIFF 3.6.0 - tif_jpeg.c,v 1.15, in Visual C++ 7.0 (.NET). 
If I set JPEGCOLORMODE_RGB it works fine.

Since I do not want to auto convert to RGB, and I want an upsampled 
YCbCr data, I look at the function JPEGPreDecode in line 745 of 
"tif_jpeg.c" and noticed that what I want is not possible if the original 
data is downsampled with "sp->xxx_sampling != 1", it will assume that I 
want a downsampled output.

So I just comment lines 743-745 to avoid the "downsampled_output = 
TRUE;", and the decoding works fine because it changed the initialization 
of the decoder functions and libJPEG is upsampling the data for JPEGDecode.

In the today logic it seems that I can not have upsampled output for a 
downsampled data if not using JPEGCOLORMODE_RGB. Is that true? Did I miss 
something?

I noticed some "XXX" comments about upsampling in the code. Can a pseudo 
tag control upsampling? It could make the upsampling/downsampling logic easier.

Thanks,
Antonio Scuri