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
April 2009

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

2009.04.16 09:42 "wrinting to TIFF_UNDEFINED", by Jachym Cepicky
2009.04.29 07:31 "Re: wrinting to TIFF_UNDEFINED", by Jachym Cepicky

2009.04.29 07:31 "Re: wrinting to TIFF_UNDEFINED", by Jachym Cepicky

Hi,

really no hint about writing tag of type TIFF_UNDEFINED to existing TIFF
file? Does anybody use any TIFF_UNDEFINED tag in libtiff, which works
and I could be inspired by it?

Thanks

Jachym


On Thu, Apr 16, 2009 at 11:42:47AM +0200, Jachym Cepicky wrote:
> Hi, 
> 
> I would like to create custom tiff tag of type TIFF_UNDEFINED. I have
> modified libtiff/tif_dirinfo.c, so it contains 
> 
> { SOILTEQTIFFTAG_SIGNATURE,    -3, -3, TIFF_UNDEFINED,
>     FIELD_CUSTOM, 0,    1,  "Signature" },
> 
> in the static const TIFFFieldInfo tiffFieldInfo[] structure.
> SOILTEQTIFFTAG_SIGNATURE is macro for 65001.
> 
> According to documentation to some kind of proprietary  program, the tag
> should contain MD5 sum of some file or 0.
> 
> When I try to read the data from reference file, which contains the tag,
> via tiffinfo, I get following result:
> 
> $ tiffinfo DS9204.TIF|grep Signature
> 
> Signature:
> 0x3c,0x7e,0x3c,0xb0,0xb1,0xfb,0x74,0x35,0x3b,0xf0,0x80,0xd1,0x76,0x5b,0x96,0xdb
> 
> which is at least something and if I let it print (I'm more familiar
> with python than with C) 
> 
> >>> print 16*"%x" %\
> >>> (0x3c,0x7e,0x3c,0xb0,0xb1,0xfb,0x74,0x35,0x3b,0xf0,0x80,0xd1,0x76,0x5b,0x96,0xdb)
> 
> I get
> 
> 3c7e3cb0b1fb74353bf080d1765b96db
> 
> which looks like md5sum
> 
> I guess, some modifications in tif_print.c have to be done. But this is not the problem. 
> 
> The problem is, how to set the Signature tag on a new fresh created
> file. No matter, if I try 
> 
> tiffset -s Signature 0
> tiffset -s Signature 0x00
> 
> tiffset -s 65001 0
> tiffset -s 65001 0x00
> 
> when I call tiffinfo afterwards, I get no response on this tag.
> 
> I tried to set other tags with TIFF_UNDEFINED type, which I found in
> tif_dirinfo.c, but none seems to be working. 
> 
> How to define writeable TIFF_UNDEFINED the correct way?
> 
> Thanks
> 
> Jachym
> -- 
> Jachym Cepicky
> e-mail: jachym.cepicky gmail com
> URL: http://les-ejk.cz
> GPG: http://www.les-ejk.cz/pgp/JachymCepicky.pgp
> Key fingerprint: 0C6D 0EAE 76BD 506C F299  ED8A C8AB 74B8 08D4 E08F



-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/JachymCepicky.pgp
Key fingerprint: 0C6D 0EAE 76BD 506C F299  ED8A C8AB 74B8 08D4 E08F