| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2007.01.05 05:08 "FW: [Tiff] removing tiff tag in-place", by Gennady KhokhorinGerben,
I did a bit futher search, following did not work either:
const TIFFFieldInfo* fip = TIFFFindFieldInfo(in, TIFFTAG_DOCUMENTNAME,
TIFF_ANY);
TIFFClrFieldBit(in, fip->field_tag);
Output image' empty tags still there.
It could be other ways to make tags cleaning...
Gennady
-----Original Message-----
From: Gennady Khokhorin
Sent: Thursday, January 04, 2007 6:47 PM
To: 'Gerben Vos'
Subject: RE: [Tiff] removing tiff tag in-place
Hi, Gerben.
Can not make it work this way. No any FIELD tag for ascii data in the
directory (tif_dir.h).
All text data are marked as FIELD_CUSTOM (tif_dirinfo.c) probably because of
variable length.
Was trying to invent those missing fields like that:
{ TIFFTAG_DOCUMENTNAME, -1,-1, TIFF_ASCII, FIELD_DOCUMENTNAME,
1, 0, "DocumentName" },
where #define FIELD_DOCUMENTNAME 50
And did break TIFFTAG<name> - FIELD<name> link, TIFFGetField() can not find
documentName field anymore.
I'm going to put a request for this command in bug list.
Happy programming!
Gennady
-----Original Message-----
From: Gerben Vos [mailto:Gerben@ZyLAB.COM]
Sent: Tuesday, January 02, 2007 3:37 AM
To: Gennady Khokhorin
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] removing tiff tag in-place
Gennady Khokhorin wrote:
> I have an empty tags which want to remove from tif wout copying
> process. I tried TIFFSetField(tif, TIFFTAG_DOCUMENTNAME, ""); but tag
> still seats in the file. Is it possible to drop an empty ascii tags?
Try TIFFClrFieldBit(tif, FIELD_DOCUMENTNAME), a macro defined in
tif_dir.h . Note: use FIELD_DOCUMENTNAME, not TIFFTAG_DOCUMENTNAME!
I've never used it, but it looks like it does what you want.
I don't think there currently is a public function for this, but I think
it would be a good idea to have one.
Gerben Vos.
|
|||||||