2009.03.16 12:36 "Re: [Tiff] Needs help on implementing the JPEG 7 compression", by Gerben Vos
The "#define JPEG_LIB_VERSION 61 /* Version 6a */" indicates the version of the *JPEG* library. The JPEG library can be downloaded separately from http://www.ijg.org/. The current version of the JPEG library is actually version 6b (and has been since 1999).
In fact, I'm surprised that you find a file called "jpeglib.h" in libtiff. It's not supposed to be there; it's part of libjpeg. Please don't confuse the two.
The *TIFF* compression type numbers (of which 6 and 7 indicate a type of JPEG compression) have nothing at all to do with the version number of the JPEG library.
In fact, the JPEG compression used by TIFF compression types 6 and 7 is the same. These TIFF compression types are just different ways of encapsulating the JPEG-compressed data within the TIFF format.
I have also posted this answer to the mailing list. Please stay on the mailing list with further questions, as long as they remain TIFF-related.
From: Sanjeev Balachander [mailto:firstname.lastname@example.org]
Sent: Monday, 16 March, 2009 13:03
To: Gerben Vos
Subject: Re: [Tiff] Needs help on implementing the JPEG 7 compression - [[SPF]] Sender is forged (SPF Fail)
Thanks for your response. Indeed i looked into the libtiff as suggested by you. However just have a question from you on correct version.
In the tif_jpeg.c it is including a file called Jpeglib.h.
In that file there is some thing like this #define JPEG_LIB_VERSION 61 /* Version 6a */ in line 35. What actually is this? Is this is library version? How to make sure that this is using compression 7.
Subject: Re: [Tiff] Needs help on implementing the JPEG 7 compression
> Sanjeev Balachander wrote:
>> I have a requirement where in i had to incorporate the JPEG 7
>> compression. When i searched in the net i am getting an algorithm for >> only JPEG 6. I am in need of some sample c code for implementin the
>> JPEG 7 compression to the TIFF images. If some one is having kindly >> do share the same if possible.
> Interesting! Where did you find the algorithm for compression type 6 > (old-style JPEG-in-TIFF)?
> C code for compression type 7 (new-style JPEG-in-TIFF) has been
> available for a long time as part of libtiff. Just download it from > http://www.remotesensing.com/libtiff/. The code is in tif_jpeg.c.
> A specification of compression type 7 can be found at
> This document also explains why it is a terribly bad idea to try to
> implement compression type 6. Libtiff contains read-only code for this > deprecated compression type.