QUERY_TIFF is a method of obtaining information about a TIFF image file without having to read the file. See QUERY_* Routines for more information.
This is an example of using QUERY_TIFF to write and read a multi-image TIFF file. The first image is a 16-bit, single channel image stored using compression. The second image is an RGB image stored using 32-bits/channel uncompressed.
; Write the image data:
rgbdata = LONARR(3,320,240)
tif_file = FILEPATH('multi.tif', /TMP)
; Read the image data back:
ok = QUERY_TIFF(tif_file,s)
imp = QUERY_TIFF(tif_file,t,IMAGE_INDEX=i)
img = READ_TIFF(tif_file,IMAGE_INDEX=i)
This routine returns a long with the value of 1 (one) if the query was successful (and the file type was correct) or 0 (zero) on failure.
A scalar string containing the pathname of the TIFF file to query.
Returns an anonymous structure containing information about the image in the file. The Info.TYPE field will return the value ‘TIFF’.
Note: See General Query * Routine Info Structures for detailed structure information.
Note: In addition to the fields returned in the Info structure for all image types, there are a number of extra fields in the Info structure for TIFF images. See QUERY_TIFF-Specific Routine Info Structures for detailed structure info.
Set this keyword to a named variable in which to return an anonymous structure containing the GeoTIFF tags and keys found in the file. If no GeoTIFF information is present in the file, the returned variable is set to a scalar zero. For a description of the possible GeoTIFF tags see the GEOTIFF keyword in READ_TIFF.
Tip: This keyword returns the same information as the GEOTIFF keyword to READ_TIFF, but avoids the overhead of reading in the entire image.
Image number index. If this value is larger than the number of images in the file, the function returns 0 (failure).
Added DESCRIPTION, DOCUMENT_NAME, DATE_TIME, and POSITION Info structures
Added GEOTIFF keyword
|8.2||Added support for BigTIFF files.|
This page has no user notes yet. Be the first one!