|AWARE [SYSTEMS]||Imaging expertise for the Delphi developer|
|TIFF and LibTiff Mailing List Archive|
LibTiff Mailing List
2000.11.22 20:34 "Re: How to use the TIFFVGetField() interface", by Rick Lamont
Tobias Patton wrote: > I need to write a C++ program that copies verbatim a number of tags from one > TIFF header to a newly created TIFF. It seems to me that I should be able to > do this quite simply with the TIFFVGetField() and TIFFVSetField() > subroutines. If it were that easy, tiffcp.c would be less than 1000 lines long. My recommendation is to lift cpTag() and friends from tiffcp.c in the tools subdirectory. It's well-tested, portable code and you can call it exactly 39 times if you wish. > My understanding is that regardless of the number and type of values > represented in a given tag, these can all be referenced by an va_list > pointer. What makes you think that va_list is a pointer? >:) Seriously, va_list is an opaque type. Variables of this type may only be manipulated by va_start(), va_arg(), and va_end(). To assume anything more is prohibited by the C Standard and results in unportable programs. You may be able to jury rig something that works on some platforms by looking in stdarg.h and making a va_list variable point to a statically allocated buffer, but I would advise against it. Rick LaMont Dot C Software, Inc.