How to Read/Open Old-Style JPEG Compressed TIFF FIles Using LibTiff in C++

I have created TIFF Reader using libtiff in c++. Now I have many tiff files with old-style jpeg compression that has to be read/open using libtiff in c++.

I guess, as "old-style" JPEG compression is deprecated in TIFF, because it was never fully specified. And because of this under-specification, various vendors implemented it in different, incompatible ways. Support was dropped in favor for TIFF compression 7, JPEG.

Unfortunately,old TIFF files using this compression still exists.

I don't know in which way to proceed may solve my problem.

Please I request anyone here to help me out from this issue.
It would be a great help.
Thanks all.
Last edited on
"Deprecated" does not mean "removed". At least read-only support should exist, if not then use another library.
Thanks modoran.
I dont know how to read "old-style" JPEG compression kind of files using libtiff in c++.
can someone guide me..
Is there any sample code available.
Thanks
According to documentation, JPEG compression is NOT available by default and depends on libjpeg library:
The JPEG package enables support for the handling of TIFF images with JPEG-encoded data. Support for JPEG-encoded data requires the Independent JPEG Group (IJG) libjpeg distribution; this software is available at ftp.uu.net:/graphics/jpeg/. If JPEG support is enabled the DIRS_LIBINC and DIR_JPEGLIB parameters should also be set (see below). By default JPEG support is not configured.

http://www.libtiff.org/build.html
Thanks modoran.
Sorry I have no Issues in reading Ojpeg tiff files.
Now the issue is:
I have a TIFF file which i cannot open/read the file using Libtiff.
But the file is in .tif extension.
I work from where my company clients send these kind of files,
I have to open these files using TIFF Reader which i created.

But i checked the file using some online viewer and i found the information about file:
Here's the full data:

JFIF
JFIF Version-1.00
Resolution-200 pixels/inch

File — basic information derived from the file.
File Type-JPEG
MIME Type-image/jpeg

Encoding Process-Baseline DCT, Huffman coding
Bits Per Sample-8
Color Components-1
File Size-482 kB
Image Size-1,666 × 2,432

I dont know whether these kind of files can be opened using either libtiff or libjpeg.
Is there some other C++ Image libraries(open source) that can open and process these kind of files.
Thanks
Last edited on
Thanks I Can now read old style jpeg images successfully.
Topic archived. No new replies allowed.