2009.02.14 11:55 "[Tiff] Different output with the same image???", by blp330

2009.04.04 16:48 "Re: [Tiff] Needs help on implementing the JPEG 7 compression", by Sanjeev Balachander

Hi,

With the information provided by you i was able to make the right decision of the selecting the library. I also have one more question.

Currently i am trying to import the file created by Adobe Photoshop and it got failed to import. When i looked into the details of the image it was found that the image is scattered in 2 different places one pointed by StripOffsets and JPEGTables tag 273 and 347 respectively. I am not sure which was i need to take. I tried by combing both the information and passed to the decompressor it failed to decompress it. Any pointer on this regards will be of great help. If any one has worked on it kindly do share those information.

Thanks

Sanjeev Balachander

Cc: "Sanjeev Balachander" <sanjeevb@vitinfotech.com> Sent: Monday, March 16, 2009 6:06 PM

Subject: Re: [Tiff] Needs help on implementing the JPEG 7 compression

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.

-----Original Message-----
From: Sanjeev Balachander [mailto:sanjeevb@vitinfotech.com]
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)

Hi Gerben,

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.

Thanks
Sanjeev Balachander

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
> http://www.remotesensing.org/libtiff/TIFFTechNote2.html
>
> 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.