| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.12.05 20:14 "Re: ITULAB JPEG support", by Jean-yves Le RidantJoris a écrit : > > I've been toying with the idea of adding a small interface on top of > TIFFReadEncodedXxx. This small interface should be named > TIFFReadSubsampledXxx. It will first call TIFFReadEncodedXxx, and if > subsampling is in effect, it will de-subsample the data. It should be a > valid call even if no subsampling is in effect, in which case it returns > immediatelly after calling TIFFReadEncodedXxx. > > This way, people will not have to worry about subsampling if they just > remember to call TIFFReadSubsampledXxx where they used to call > TIFFReadEncodedXxx. It is in the proper position, i.e. it is independent > of the compression or color mode used, works on JPEG compressed YCbCr as > well as on flate compressed CIELAB or whatever. > > Is this what you are asking after? Understand I dont (properly saying) "ask" for something else than a "responsable" for jpeg in tiff affairs. :-) What I post here must me more understood as remarks from what I experienced when trying to add some fonctionnality to "libjpegtiff", for my own use, and with in mind to be "contribuable" as possible, so "less change being beautifull" . ( note that sources of what I place somewhere in the web during last thread are "a un ou deux bugs près" what I posted in bugzilla bazurk. :-) And, another point : I'm totally unaware of "how things goes" in evolutions of a packages like libtiff or jpeglib ..... My first impression is that this way may turn fairly complicated. Libjpeg ( except with some patch I did for it ) don't know anything about tiff's interleaved subsampled line, scanlinesize ... ( note that such concept is "per se" questionnable ) So as soon as you deal with subsampled data, you have to use the "raw" interface of libjpeg, then buffer yourself an "imcurow" ( something as planar separate represention but with not exactly same alignement a tiff file would have ), and then, you'll had add a buffer level produce upsampled data as soon as you have a vsamp of 2 .... To get YCbCr for client ... At the end, you dispatch/duplicate libjpeg, in both tif_jpeg.c and clients apps... Ahma ... :-))), and caricaturing, with goal of spreading files for as most reader/viewvers as possible, and simplifying tif_jpeg and surrounding, facing to disaccordance of IFD and what codec return : "correct" IFD when opening the file from what codec will return, and let wizzards use low-level functions to get subsampled data :-))) -- Jean-Yves Le Ridant. |
|||||||