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
March 2006

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

2006.03.09 01:57 "tiff headers", by Jasmin Roohi
2006.03.09 07:44 "Re: tiff headers", by Andrey Kiselev

2006.03.09 07:44 "Re: tiff headers", by Andrey Kiselev

Hello Jasmin,

On Wed, Mar 08, 2006 at 08:57:56PM -0500, Jasmin Roohi wrote:
> Hello. I've been trying to alter the content of a tiff header. The tiff
> header contains the following information:

What do you mean as a "TIFF header"? Could you show tiffinfo/tiffdump
output for these files?

> 2 Images, TIFF (compressed)
> Image Wavelengths=635, 635
> Size=1500x3800, 1500x3800 pixels
> Scaling=10, 10 µm per pixel
> Image Format=16-bit grayscale
> PMT Gain=0, 0
> Laser Power=100, 100
> Normalization Factor=1.000, 1.000
> 
> I used the following Linux code to change "Scaling=10, 10 µm per pixel" to
> "Scaling=5" but had no luck. The images "both layers combined.tif" and "
> test.tif" are identical except "both layers combined.tif" is compressed. I
> would be grateful for any help you could give me. Thanks.
> 
> [roohi@elipc2 roohi]$ ls
> 
> both layers combined.tif
> 
> [roohi@elipc2 roohi]$ tiffset
> 
> usage: tiffset [-s name value] filename
> 
> [roohi@elipc2 roohi]$ man tiffset
> 
> No manual entry for tiffset

The recent libtiff releases contain manual page for tiffset. You can try
to update the your one.

> [roohi@elipc2 roohi]$ tiffset -s Scaling 5 both\ layers\ combined.tif
> 
> both layers combined.tif: Can't open a compressed TIFF file with compression
> for update..

That should work. I am recommend to grab the CVS snapshot and try it.
But you can't add an arbitrary tag to TIFF. tiffset only can work with
predefined set of tags, hardcoded in the library (see the
tiff.h/tif_dirinfo.c for the list of hardcoded tags). It is possible to
work with arbitarry tags using the custom tag way, but it requires
writing your own utility based on libtiff (search list archives for
sample code).

> [roohi@elipc2 roohi]$ tiffset -s Scaling 5 test.tif
> 
> test.tif: Warning, unknown field with tag 700 (0x2bc) ignored.
> 
> test.tif: Warning, unknown field with tag 34665 (0x8769) ignored.

That is what I said above: all unknow tags will be skipped and their
contents will be lost when the header will be rewritten.

Regards,
Andrey


-- 
Andrey V. Kiselev
ICQ# 26871517