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
January 2005

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

2005.01.21 22:47 "removing tiff header tags", by <melser.anton@gmail.com>
2005.01.22 05:40 "Re: removing tiff header tags", by Frank Warmerdam

2005.01.21 22:47 "removing tiff header tags", by <melser.anton@gmail.com>

Hi,

In spite of really not knowing what on earth I am doing, I have managed 
to do what I think will be enough for our needs. It is *horrible*! Even 
though I know nothing about c style, I can tell you even a monkey would 
bork at it...

I worked on the assumption that in tiffcp, in the function tiffcp, 
everything that wasn't in the loop:

for (p = tags; p < &tags[NTAGS]; p++)
		CopyTag(p->tag, p->count, p->type);

would be sorely missed, so not to bother with it. From what I can 
remember there was nothing not in the spec we need to follow anyway. So 
I put a commandline option (-d tagToDelete), and if it is passed then 
just before getting to the tiffcp function I take control to my 
function, which I pass the value (number?) of the tag to (as well as in 
and out). I then do everything else that tiffcp does except change the 
loop to:

for (p = tags; p < &tags[NTAGS]; p++){
		if (tagToDelete != p->tag)
			CopyTag(p->tag, p->count, p->type);
		else
			printf("HUUUUUUUUUURRRRRAAAAAAAHHHHHHH\n");
}

And what do ya know? It works! I won't bother posting it anywhere, cos 
it would be far less work for a competent c programmer to write from 
scratch than to clean up what I did.

I do have one question though - is my assumption correct that I 
shouldn't be messing with the tags that come before the loop (see how 
well I know the format ;-)?)? If not, which ones could I reasonably test 
and omit?

Cheers
Antoine