Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

getTag

Class: Tiff

Value of specified tag

Syntax

tagValue = getTag(tagId)

Description

tagValue = getTag(tagId) retrieves the value of the TIFF tag specified by tagId. You can specify tagId as a character string ('ImageWidth') or using the numeric tag identifier defined by the TIFF specification (256). To see a list of all the tags with their numeric identifiers, view the value of the Tiff object TagID property. Use the TagID property to specify the value of a tag. For example, Tiff.TagID.ImageWidth is equivalent to the tag's numeric identifier.

Examples

expand all

Open a Tiff object and get the value of a tag. Specify the tag by name.

t = Tiff('example.tif','r');
tagval = t.getTag('ImageWidth')
tagval =

   600

Alternatively, specify the tag by numeric identifier.

tagval1 = t.getTag(256)
tagval1 =

   600

Another way to specify the numeric identifier is to use the TagID property.

tagval2 = t.getTag(Tiff.TagID.ImageWidth)
tagval2 =

   600

Close the Tiff object.

t.close();

Related Examples

References

This method corresponds to the TIFFGetField function in the LibTIFF C API. To use this method, you must be familiar with the TIFF specification and technical notes. View this documentation at LibTiff - TIFF Library and Utilities.

See Also

Was this topic helpful?