logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TIFFFieldQuery - routines to query TIFF field information

Author

       LibTIFF contributors

Description

TIFFFieldWithName()  and  TIFFFieldWithTag()  return a pointer to TIFF field information structure fip by
       the tag's field_name or its tag number.

       TIFFFindField() searches for the TIFF field information structure  fip  of  a  given  tag  number  and  a
       specific TIFFDataTypedt.  With dt== TIFF_ANY the behaviour is the same than for TIFFFieldWithTag().

       All  three  functions  return  NULL,  when the tag is not registered within libtiff (see also DefaultTagAuto-registration ).
          Such a TIFFDataType dependent search could be useful when the same  tag  is  defined  twice  but  with
          different  data  types, which is true for rare cases like TIFFTAG_XCLIPPATHUNITS. However, the libtiff
          does currently not support multiple definitions of the same tag.

       The following routines return status information about TIFF fields.

       fip  is  a  field  information  pointer  previously  returned  by  TIFFFindField(),   TIFFFieldWithTag(),
       TIFFFieldWithName().

       TIFFFieldIsAnonymous()  returns true (nonzero) if the field, read from file, is unknown to libtiff and an
       anonymous field has been auto-registered. Return is zero "0" if field is known to libtiff.  See   DefaultTagAuto-registration   for more information.

       TIFFFieldSetGetSize()  returns  the  data  size in bytes of the field data type used for libtiff internal
       storage.   This  is  also  the  data  size  of  the  parameter  to  be  provided  to  TIFFSetField()  and
       TIFFGetField().  Custom  TIFF_RATIONAL  values  can  be  stored  internally  either  as  float or double.
       TIFFFieldSetGetSize() would then return "4" or "8", respectively.

       TIFFFieldSetGetCountSize() returns size of count parameter of TIFFSetField() and TIFFGetField() and  also
       if it is required:  0=none, 2= uint16_t, 4= uint32_t.  See also description of TIFFFieldReadCount().

Diagnostics

       None.

Name

       TIFFFieldQuery - routines to query TIFF field information

See Also

TIFFFieldDataType (3tiff), TIFFFieldName (3tiff), TIFFFieldPassCount (3tiff), TIFFFieldReadCount (3tiff),
       TIFFFieldTag (3tiff), TIFFFieldWriteCount (3tiff), libtiff (3tiff)

Synopsis

          #include <tiffio.h>

       constTIFFField*TIFFFieldWithName(TIFF*tif,constchar*field_name)constTIFFField*TIFFFieldWithTag(TIFF*tif,uint32_ttag)constTIFFField*TIFFFindField(TIFF*tif,uint32_ttag,TIFFDataTypedt)intTIFFFieldIsAnonymous(constTIFFField*fip)intTIFFFieldSetGetSize(constTIFFField*fip)intTIFFFieldSetGetCountSize(constTIFFField*fip)

See Also