API Reference#
Helper API#
- nvtiffStatus_t nvtiffGetProperty(
- libraryPropertyType type,
- int *value
Gets the library’s property values.
This function retrieves version information about the nvTIFF library. The
libraryPropertyTypeenum is defined in CUDA’slibrary_types.hheader.- Parameters:
type – [in] The property to retrieve. Valid values are:
MAJOR_VERSION- Returns the major version number.MINOR_VERSION- Returns the minor version number.PATCH_LEVEL- Returns the patch level.
value – [out] Pointer to receive the numeric value of the requested property.
- Returns:
An error code as specified in API Return Status Codes.
-
nvtiffStatus_t nvtiffStreamClose(nvtiffStream_t tiff_stream)#
Closes a bitstream handle and releases its resources.
Closes a handle previously opened by nvtiffStreamOpen or nvtiffStreamOpenFromFile.
- Parameters:
tiff_stream – [in] nvTIFF bitstream handle to close.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecoderCreate(
- nvtiffDecoder_t *decoder,
- nvtiffDeviceAllocator_t *device_allocator,
- nvtiffPinnedAllocator_t *pinned_allocator,
- cudaStream_t stream
Creates an instance of the decoder handle with custom memory allocators.
- Parameters:
decoder – [out] Pointer to nvTIFF decoder handle.
device_allocator – [in] User-provided device memory allocator. If
NULL, the library usescudaMalloc/cudaFree.pinned_allocator – [in] User-provided pinned memory allocator. If
NULL, the library usescudaHostAlloc/cudaFreeHost.stream – [in] CUDA stream for asynchronous API calls.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecoderCreateSimple(
- nvtiffDecoder_t *decoder,
- cudaStream_t stream
Creates an instance of the decoder handle with default memory allocators.
- Parameters:
decoder – [out] Pointer to nvTIFF decoder handle.
stream – [in] CUDA stream for asynchronous API calls.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecoderDestroy(
- nvtiffDecoder_t decoder,
- cudaStream_t stream
Releases the decoder handle.
- Parameters:
decoder – [in] nvTIFF decoder handle to destroy.
stream – [in] CUDA stream for asynchronous API calls.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecodeParamsCreate(
- nvtiffDecodeParams_t *decode_params
Creates an instance of the decode parameters handle.
- Parameters:
decode_params – [out] Pointer to decode parameters handle.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecodeParamsDestroy(
- nvtiffDecodeParams_t decode_params
Releases the decode parameters handle.
- Parameters:
decode_params – [in] Decode parameters handle to destroy.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncoderCreate(
- nvtiffEncoder_t *encoder,
- nvtiffDeviceAllocator_t *device_allocator,
- nvtiffPinnedAllocator_t *pinned_allocator,
- cudaStream_t stream
Creates and initializes a TIFF encoder instance.
- Parameters:
encoder – [out] Pointer to encoder handle.
device_allocator – [in] Custom device memory allocator (can be
NULLto usecudaMalloc()/cudaFree()).pinned_allocator – [in] Custom pinned memory allocator (can be
NULLto usecudaHostAlloc()/cudaFreeHost()).stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncoderDestroy(
- nvtiffEncoder_t encoder,
- cudaStream_t stream
Destroys a TIFF encoder instance and frees associated resources.
- Parameters:
encoder – [in] Encoder handle to destroy.
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
-
nvtiffStatus_t nvtiffEncodeParamsCreate(nvtiffEncodeParams_t *params)#
Creates and initializes encode parameters object.
- Parameters:
params – [out] Pointer to encode parameters handle.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsDestroy(
- nvtiffEncodeParams_t params,
- cudaStream_t stream
Destroys encode parameters object and frees associated resources.
- Parameters:
params – [in] Encode parameters handle.
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
Parser API#
- nvtiffStatus_t nvtiffStreamOpenFromFile(
- const char *fname,
- nvtiffStream_t *tiff_stream
Opens a TIFF from a file: allocates the handle and validates the TIFF header only.
Allocates a new stream handle (no separate create step) and reads and validates the TIFF header. Each IFD is parsed on first access (e.g. nvtiffStreamGetImageInfo, a tag getter, or decode). Opening returns an error for an I/O failure (missing or unreadable file) or a malformed TIFF header (bad magic or version); an IFD whose structure or contents are invalid reports
NVTIFF_STATUS_BAD_TIFFwhen it is first accessed. On any failure*tiff_streamis set toNULLand there is nothing to close. On success, close the handle with nvtiffStreamClose.- Parameters:
fname – [in] TIFF file name on disk.
tiff_stream – [out] Receives the newly opened TIFF stream handle (
NULLon failure).
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamOpen(
- const uint8_t *buffer,
- size_t buffer_size,
- nvtiffStream_t *tiff_stream
Opens a TIFF from host memory: allocates the handle and validates the TIFF header only.
See nvtiffStreamOpenFromFile for the open/lazy-parse contract (it allocates the handle and sets
*tiff_streamtoNULLon failure). The host buffer must remain valid and unmodified for the entire lifetime of the stream (until nvtiffStreamClose), since IFDs and tag data are read on demand. For best decode performance, the host buffer should be page-locked (pinned) memory, e.g. allocated withcudaHostAlloc.- Parameters:
buffer – [in] Buffer containing TIFF file data.
buffer_size – [in] Size of the buffer in bytes.
tiff_stream – [out] Receives the newly opened TIFF stream handle (
NULLon failure).
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetHeader(
- nvtiffStream_t tiff_stream,
- nvtiffStreamHeader_t *header
Reads the file header: the TIFF format variant and the first image’s IFD offset.
- Parameters:
tiff_stream – [in] TIFF stream handle.
header – [out] Receives the file header.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetNextIFDOffset(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- size_t *next_ifd_offset
Returns the IFD offset of the image (IFD) following
ifd_offsetin the chain.Reads each IFD’s header (entry count and next-IFD pointer) and extends the internal chain map as needed; it does not parse tag data.
Count images - walk and tally:
nvtiffStreamHeader_t h; uint32_t n = 0; nvtiffStreamGetHeader(s, &h); for (size_t off = h.first_ifd_offset; off != NVTIFF_NO_IMAGE; n++) nvtiffStreamGetNextIFDOffset(s, off, &off);
Collect offsets - push each into a container:
nvtiffStreamHeader_t h; nvtiffStreamGetHeader(s, &h); std::vector<size_t> offsets; for (size_t off = h.first_ifd_offset; off != NVTIFF_NO_IMAGE; ) { offsets.push_back(off); nvtiffStreamGetNextIFDOffset(s, off, &off); }
To walk a SubIFD chain, seed with the SubIFD’s offset instead of
h.first_ifd_offset.- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] Current image’s offset; 0 selects the first IFD.
next_ifd_offset – [out] Offset of the following image, or
NVTIFF_NO_IMAGEat the end of the chain.
- Returns:
An error code as specified in API Return Status Codes.
-
nvtiffStatus_t nvtiffStreamPrint(nvtiffStream_t tiff_stream)#
Prints the TIFF file metadata to standard output.
- Parameters:
tiff_stream – [in] TIFF stream handle.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetImageInfo(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- nvtiffImageInfo_t *image_info
Retrieves the image information for a given image in a TIFF file.
- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
image_info – [out] Pointer to nvtiffImageInfo_t structure to receive the image information.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetImageGeometry(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- nvtiffImageGeometry_t *geometry
Retrieves image geometry information.
Geometry includes information whether the images use strips or tiles and their corresponding dimensions.
- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
geometry – [out] Pointer to nvtiffImageGeometry_t structure.
- Returns:
An error code as specified in API Return Status Codes.
Metadata API#
- nvtiffStatus_t nvtiffStreamGetTagInfo(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- uint16_t tiff_tag,
- nvtiffTagDataType_t *tag_type,
- uint32_t *size,
- uint32_t *count
Retrieves TIFF tag information.
Retrieves tag type, size per element, and count for any TIFF tag in an image. If the tag is not found, returns
NVTIFF_STATUS_TAG_NOT_FOUND.- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
tiff_tag – [in] TIFF tag ID
tag_type – [out] Pointer to receive the datatype of the tag.
size – [out] Pointer to receive the size per element. When tag type is
NVTIFF_TAG_TYPE_ASCII, the string is NULL terminated.count – [out] Pointer to receive the number of values in the tag.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetTagValue(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- uint16_t tiff_tag,
- void *tag_value,
- uint32_t count
Retrieves the values stored in a TIFF tag.
If the tag is not found, returns
NVTIFF_STATUS_TAG_NOT_FOUND.- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
tiff_tag – [in] TIFF tag ID
tag_value – [out] Pointer to buffer to receive the tag values.
count – [in] Number of values to retrieve.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetNumberOfTags(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- uint16_t *tags,
- uint32_t *num_tags
Enumerates all TIFF tags present in a specific image.
Use the two-call pattern: first call with tags=
NULLto get the count, then allocate a buffer and call again to retrieve the tag IDs.- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
tags – [out] Pointer to buffer for storing tag IDs (can be
NULLto get count only).num_tags – [out] Pointer to receive the number of tags.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamHasTag(
- nvtiffStream_t tiff_stream,
- size_t ifd_offset,
- uint16_t tag,
- int *has_tag
Checks whether a specific tag exists in an image.
This is useful for quickly determining tag presence without enumerating all tags.
- Parameters:
tiff_stream – [in] TIFF stream handle.
ifd_offset – [in] IFD offset of the IFD; 0 selects the first IFD.
tag – [in] Tag ID to check for.
has_tag – [out] Set to 1 if tag exists, 0 if not.
- Returns:
An error code as specified in API Return Status Codes.
GeoTIFF Metadata API#
- nvtiffStatus_t nvtiffStreamGetGeoKeyInfo(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t key,
- uint32_t *size,
- uint32_t *count,
- nvtiffGeoKeyDataType_t *type
Retrieves information about a GeoTIFF key.
This information is useful for retrieving the values associated with the geo key.
- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [in] GeoTIFF key to query.
size – [out] Pointer to receive the size of each value (in bytes).
count – [out] Pointer to receive the number of values stored in key.
type – [out] Pointer to receive the datatype of values stored in key.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetNumberOfGeoKeys(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t *key,
- uint32_t *num_keys
Retrieves the list of GeoTIFF keys present in a TIFF file and their count.
Use the two-call pattern: first call with key=
NULLto get the count, then allocate a buffer and call again to retrieve the key IDs.- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [out] Pointer to buffer for storing geokey IDs (can be
NULLto get count only).num_keys – [out] Pointer to receive the number of geokeys.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetGeoKey(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t key,
- void *val,
- uint32_t count
Retrieves the values associated with a given GeoTIFF key.
- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [in] GeoTIFF key to retrieve.
val – [out] Pointer to buffer to receive the key values.
count – [in] Number of values to copy. For
NVTIFF_GEOKEY_TYPE_ASCIIthis is ignored. ForNVTIFF_GEOKEY_TYPE_SHORT,count=1is implied.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetGeoKeyASCII(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t key,
- char *str,
- uint32_t max_len
Retrieves ASCII values associated with a GeoTIFF key.
- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [in] GeoTIFF key to retrieve.
str – [out] Pointer to buffer to receive the ASCII string.
max_len – [in] Size of the user-allocated buffer
str.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetGeoKeySHORT(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t key,
- unsigned short *val,
- uint32_t index,
- uint32_t count
Retrieves SHORT values associated with a GeoTIFF key.
- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [in] GeoTIFF key to retrieve.
val – [out] Pointer to buffer to receive the SHORT values.
index – [in] Index of the starting value to copy.
count – [in] Number of values to copy.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffStreamGetGeoKeyDOUBLE(
- nvtiffStream_t tiff_stream,
- nvtiffGeoKey_t key,
- double *val,
- uint32_t index,
- uint32_t count
Retrieves DOUBLE values associated with a GeoTIFF key.
- Parameters:
tiff_stream – [in] TIFF stream handle.
key – [in] GeoTIFF key to retrieve.
val – [out] Pointer to buffer to receive the DOUBLE values.
index – [in] Index of the starting value to copy.
count – [in] Number of values to copy.
- Returns:
An error code as specified in API Return Status Codes.
Decode API#
- nvtiffStatus_t nvtiffDecode(
- nvtiffStream_t tiff_stream,
- nvtiffDecoder_t decoder,
- nvtiffDecodeParams_t params,
- nvtiffImage_t *image_out,
- cudaStream_t stream
Decodes the regions configured in
paramsfrom one source stream.Submits the decode request described by
paramsagainsttiff_stream. The request has one or more effective regions (see nvtiffDecodeParamsSetRegions). A freshly created params object, or one reset withnvtiffDecodeParamsSetRegions(params, NULL, 0), has exactly one effective region: the first full image at IFD offset 0. The function is asynchronous with respect to the host.image_outpoints to an array of output descriptors, one per effective region. For a freshly created params object this is a single descriptor; after a non-emptynvtiffDecodeParamsSetRegions(params, regions, count)call,image_outmust containcountdescriptors. Each descriptor must provide one plane with sufficient, sample-aligned pitch for the resolved output width.A multi-region request executes as one compatible batch or is rejected with
NVTIFF_STATUS_BATCH_INCOMPATIBLE. The library never silently splits an incompatible request into serial decodes. Regions may resolve to different output sizes within a single batch; each is written to its own descriptor inimage_out. Compatibility depends on the images sharing strile layout and codec, not on the regions being the same size.Note
A decoder may have only one decode in flight at a time. Every call to nvtiffDecode must be followed by stream completion (for example
cudaStreamSynchronize), regardless of the returned status, before the same decoder is reused or destroyed. The decoder reuses internal scratch buffers and may have submitted work before reporting an error. To decode concurrently, use separate decoders. The sourcetiff_streamand any memory backing it must remain valid until the submitted work completes.- Parameters:
tiff_stream – [in] TIFF stream handle containing the parsed file. All region IFD offsets are interpreted in this stream’s address space.
decoder – [in] Decoder handle.
params – [in] Decode parameters describing output format and regions.
image_out – [out] Array of output descriptors, one per effective region.
stream – [in] CUDA stream for GPU work submission.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecodeCheckSupported(
- nvtiffStream_t tiff_stream,
- nvtiffDecoder_t decoder,
- nvtiffDecodeParams_t params,
- const nvtiffImage_t *image_out
Dry-run of nvtiffDecode: validates the request without enqueuing GPU work.
Validates the configured request against the provided stream without enqueuing GPU work. It omits the
cudaStream_tfor that reason, and takes aconstimage_outbecause it inspects the descriptors but does not mutate them.image_outhas two modes:Non-
NULL:full dry-run. The same source-image, batch-compatibility, and output-descriptor checks nvtiffDecode performs are applied, and the call returns the pre-launch status nvtiffDecode would return for the sametiff_stream,decoder,params, and descriptor values. (nvtiffDecode itself rejects aNULLimage_outas an invalid argument.)NULL:request-only probe. Output-descriptor validation is skipped; only the request and source images are checked. Use this to ask “are these images individually decodable, and can they batch
together?” without allocating output descriptors.
In both modes a caller can distinguish “unsupported image” (e.g.
NVTIFF_STATUS_TIFF_NOT_SUPPORTED) from “valid images that cannot batch together” (NVTIFF_STATUS_BATCH_INCOMPATIBLE) before submitting work.- Parameters:
tiff_stream – [in] TIFF stream handle containing the parsed file.
decoder – [in] Decoder handle.
params – [in] Decode parameters describing output format and regions.
image_out – [in] Array of output descriptors, one per effective region, or
NULLto skip descriptor validation.
- Returns:
The pre-launch status nvtiffDecode would return, as specified in API Return Status Codes.
Decode Parameters API#
- nvtiffStatus_t nvtiffDecodeParamsSetOutputFormat(
- nvtiffDecodeParams_t decode_params,
- nvtiffOutputFormat_t format
Sets the decode output format.
The default value is
NVTIFF_OUTPUT_UNCHANGED_I.Buffer size and pitch requirements:
When
NVTIFF_OUTPUT_UNCHANGED_Iis used:Buffer size:
image_height * DivUp(image_width * bits_per_pixel, 8)Pitch must be aligned to
DivUp(bits_per_sample[0], 8)bytes.Default pitch (if not specified):
DivUp(image_width * bits_per_pixel, 8)
When
NVTIFF_OUTPUT_RGB_I_UINT8is used:Buffer size:
image_width * image_height * 3Pitch must be aligned to 1 byte.
When
NVTIFF_OUTPUT_RGB_I_UINT16is used:Buffer size:
image_width * image_height * 6Pitch must be aligned to 2 bytes.
- Parameters:
decode_params – [in/out] Decode parameters handle.
format – [in] Output format value.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffDecodeParamsSetRegions(
- nvtiffDecodeParams_t decode_params,
- const nvtiffDecodeRegion_t *regions,
- uint32_t count
Configures the explicit set of regions to decode.
Replaces the entire explicit region set in
decode_paramswith exactly the provided array. This is the only region-configuration API; a full image at any IFD offset is a one-element array withwidth=height= 0.Fresh params already represent the default request (one full image at IFD offset 0), so the common “decode the first full image” path needs no call to this function. Passing
regions=NULLandcount= 0 resets params to that default; this is supported for state reset, but prefer fresh params for the default path and an explicit one-element array for a non-default full-image decode.The region descriptors are source-free: they carry no stream handle, and their IFD offsets are interpreted against whichever
tiff_streamis later passed to nvtiffDecode or nvtiffDecodeCheckSupported. A configured params object can therefore be reused across streams.This call performs only mechanical argument checks; it does not validate region contents against any stream. IFD offset validity, ROI bounds, codec support, output descriptors, and batch compatibility are validated by nvtiffDecodeCheckSupported and nvtiffDecode.
For a non-empty input, the caller’s array is deep-copied before this call returns, so the caller may free or mutate it afterwards. If the call fails a mechanical check or an allocation while copying, the existing params state is left unchanged.
- Parameters:
decode_params – [in/out] Decode parameters handle.
regions – [in] Array of
countregion descriptors, orNULLwhencountis 0.count – [in] Number of regions, or 0 to reset to the default first full-image request.
- Returns:
An error code as specified in API Return Status Codes.
Encode API#
- nvtiffStatus_t nvtiffEncode(
- nvtiffEncoder_t encoder,
- nvtiffEncodeParams_t *params,
- uint32_t num_params,
- cudaStream_t stream
Performs asynchronous TIFF encoding of one or more images.
Parameters must be set using
nvtiffEncodeParamsSetImageInfo()andnvtiffEncodeParamsSetInputs()before calling this function. LZW output is written as LZW even when the compressed bitstream is larger than the raw input image data. If an encoded strile exceeds the reserved output allocation,nvtiffEncodeFinalize()reports an error.- Parameters:
encoder – [in] Encoder handle.
params – [in] Array of encode parameters.
num_params – [in] Number of encode parameters (must be 1 for now).
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeFinalize(
- nvtiffEncoder_t encoder,
- nvtiffEncodeParams_t *params,
- uint32_t num_params,
- cudaStream_t stream
Finalizes asynchronous TIFF encoding operation started by
nvtiffEncode().This function must be called before the encoded bitstream can be written with
nvtiffWriteTiffBuffer()ornvtiffWriteTiffFile().- Parameters:
encoder – [in] Encoder handle.
params – [in] Array of encode parameters.
num_params – [in] Number of encode parameters (must be 1 for now).
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffGetBitstreamSize(
- nvtiffEncoder_t encoder,
- nvtiffEncodeParams_t *params,
- uint32_t num_params,
- size_t *metadata_size,
- size_t *bitstream_size
Calculates the size of TIFF metadata and/or compressed bitstream.
Either
metadata_sizeorbitstream_sizecan beNULLto skip that calculation.metadata_sizecan be calculated before callingnvtiffEncode(), butbitstream_sizecan only be calculated afternvtiffEncodeFinalize()is called.- Parameters:
encoder – [in] Encoder handle.
params – [in] Array of encode parameters.
num_params – [in] Number of encode parameters (must be 1 for now).
metadata_size – [out] Size of TIFF metadata in bytes (can be NULL).
bitstream_size – [out] Size of compressed data in bytes (can be NULL).
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffWriteTiffBuffer(
- nvtiffEncoder_t encoder,
- nvtiffEncodeParams_t *params,
- uint32_t num_params,
- uint8_t *buffer,
- size_t size,
- cudaStream_t stream
Writes complete TIFF data including metadata to a host memory buffer.
This function performs stream synchronization internally to ensure the bitstream is ready.
- Parameters:
encoder – [in] Encoder handle.
params – [in] Array of encode parameters.
num_params – [in] Number of encode parameters (must be 1 for now).
buffer – [out] Buffer to write TIFF data to.
size – [in] Size of output buffer in bytes.
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffWriteTiffFile(
- nvtiffEncoder_t encoder,
- nvtiffEncodeParams_t *params,
- uint32_t num_params,
- const char *fname,
- cudaStream_t stream
Writes complete TIFF data including metadata to a file.
This function performs stream synchronization internally to ensure the bitstream is ready.
- Parameters:
encoder – [in] Encoder handle.
params – [in] Array of encode parameters.
num_params – [in] Number of encode parameters (must be 1 for now).
fname – [in] Output file path.
stream – [in] CUDA stream.
- Returns:
An error code as specified in API Return Status Codes.
Encode Parameters API#
- nvtiffStatus_t nvtiffEncodeParamsSetTiffVariant(
- nvtiffEncodeParams_t params,
- nvtiffVariant_t variant
Sets the TIFF variant (regular or BigTIFF) for encoding.
This API is optional; by default, regular TIFF is used.
- Parameters:
params – [in] Encode parameters handle.
variant – [in] TIFF variant (
NVTIFF_REGULAR_TIFForNVTIFF_BIG_TIFF).
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetImageInfo(
- nvtiffEncodeParams_t params,
- const nvtiffImageInfo_t *image_info
Sets image information for encoding.
Required fields:
image_width,image_height,samples_per_pixel,bits_per_sample, andsample_format(for each sample in a pixel).Constraints:
samples_per_pixelmust be 1, or 3 to 5 for non-JPEG encodes.photometric_intmust beNVTIFF_PHOTOMETRIC_RGB(ifsamples_per_pixelis 3 or more) orNVTIFF_PHOTOMETRIC_MINISBLACK(ifsamples_per_pixelis 1).NVTIFF_PHOTOMETRIC_UNKNOWNis auto-set.sample_formatmust beNVTIFF_SAMPLEFORMAT_UNKNOWN,NVTIFF_SAMPLEFORMAT_UINT, orNVTIFF_SAMPLEFORMAT_IEEEFP.planar_configmust beNVTIFF_PLANARCONFIG_CONTIG.compressionmust beNVTIFF_COMPRESSION_LZW,NVTIFF_COMPRESSION_NONE, orNVTIFF_COMPRESSION_JPEG. JPEG encoding requires nvJPEG and supports only unsigned 8-bit grayscale or RGB input.
- Parameters:
params – [in] Encode parameters handle.
image_info – [in] Pointer to image information structure.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetImageGeometry(
- nvtiffEncodeParams_t params,
- const nvtiffImageGeometry_t *geometry
Sets strip/tile geometry for encoding.
This is optional. By default, JPEG-encoded images are written as a single full-height strip; None and LZW compression use the existing approximately 8 KiB strip default. For striped output, set
typeto NVTIFF_IMAGE_STRIPED andstrile_heightto the number of rows per strip. Ifstrile_widthis set for striped output, it must match the image width. For tiled output, settypeto NVTIFF_IMAGE_TILED and setstrile_widthandstrile_heightto the tile dimensions. Tile dimensions must be positive multiples of 16.- Parameters:
params – [in] Encode parameters handle.
geometry – [in] Pointer to image geometry structure.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetJpegOptions(
- nvtiffEncodeParams_t params,
- const nvtiffJpegEncodeOptions_t *options
Sets JPEG-specific encode options.
This API is optional and affects only
NVTIFF_COMPRESSION_JPEGencodes. It may be called before or afternvtiffEncodeParamsSetImageInfo(). The defaults preserve the built-in JPEG preset: quality 90, optimized Huffman disabled, and 4:2:0 chroma sampling for RGB input.- Parameters:
params – [in] Encode parameters handle.
options – [in] Pointer to JPEG encode options.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetInputs(
- nvtiffEncodeParams_t params,
- uint8_t **images_d,
- uint32_t num_images
Sets input image pointers for encoding.
- Parameters:
params – [in] Encode parameters handle.
images_d – [in] Host array of size
num_imagesof pointers to device buffers.num_images – [in] Number of input images.
- Returns:
An error code as specified in API Return Status Codes.
Encode Metadata API#
- nvtiffStatus_t nvtiffEncodeParamsSetTag(
- nvtiffEncodeParams_t params,
- uint16_t tag,
- nvtiffTagDataType type,
- void *value,
- uint32_t count
Sets a TIFF tag with specified type and value.
- Parameters:
params – [in] Encode parameters handle.
tag – [in] TIFF tag to set.
type – [in] Data type of tag value.
value – [in] Pointer to tag value.
count – [in] Number of values.
- Returns:
An error code as specified in API Return Status Codes.
Encode Parameters API#
- nvtiffStatus_t nvtiffEncodeParamsSetGeoKey(
- nvtiffEncodeParams_t params,
- nvtiffGeoKey_t key,
- nvtiffGeoKeyDataType_t type,
- void *value,
- uint32_t value_size,
- uint32_t count
Sets a GeoTIFF key with arbitrary type and value.
- Parameters:
params – [in] Encode parameters handle.
key – [in] GeoTIFF key to set.
type – [in] Data type of the key value.
value – [in] Pointer to key value.
value_size – [in] Size of individual value in bytes.
count – [in] Number of values.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetGeoKeySHORT(
- nvtiffEncodeParams_t params,
- nvtiffGeoKey_t key,
- uint16_t value,
- uint32_t count
Sets a GeoTIFF key with SHORT value type.
- Parameters:
params – [in] Encode parameters handle.
key – [in] GeoTIFF key to set.
value – [in] SHORT value to set.
count – [in] Number of values.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetGeoKeyDOUBLE(
- nvtiffEncodeParams_t params,
- nvtiffGeoKey_t key,
- double value,
- uint32_t count
Sets a GeoTIFF key with DOUBLE value type.
- Parameters:
params – [in] Encode parameters handle.
key – [in] GeoTIFF key to set.
value – [in] DOUBLE value to set.
count – [in] Number of values.
- Returns:
An error code as specified in API Return Status Codes.
- nvtiffStatus_t nvtiffEncodeParamsSetGeoKeyASCII(
- nvtiffEncodeParams_t params,
- nvtiffGeoKey_t key,
- const char *value,
- uint32_t value_size
Sets a GeoTIFF key with ASCII value type.
- Parameters:
params – [in] Encode parameters handle.
key – [in] GeoTIFF key to set.
value – [in] ASCII string value.
value_size – [in] Size of ASCII string including null terminator.
- Returns:
An error code as specified in API Return Status Codes.
Type Declarations#
API Return Status Codes#
-
enum nvtiffStatus_t#
Return status codes for nvTIFF APIs.
Values:
-
enumerator NVTIFF_STATUS_SUCCESS#
The API call finished successfully. Note that many calls are asynchronous and some errors may only be seen after synchronization.
-
enumerator NVTIFF_STATUS_NOT_INITIALIZED#
The library handle was not initialized.
-
enumerator NVTIFF_STATUS_INVALID_PARAMETER#
Wrong parameter was passed. For example, a null pointer as input data, or an invalid enum value.
-
enumerator NVTIFF_STATUS_BAD_TIFF#
Cannot parse the TIFF stream. Likely due to a corruption that cannot be handled.
-
enumerator NVTIFF_STATUS_TIFF_NOT_SUPPORTED#
Attempting to decode a TIFF stream that is not supported by the nvTIFF library.
-
enumerator NVTIFF_STATUS_ALLOCATOR_FAILURE#
The user-provided allocator functions returned a non-zero code.
-
enumerator NVTIFF_STATUS_EXECUTION_FAILED#
Error during the execution of the device tasks.
-
enumerator NVTIFF_STATUS_ARCH_MISMATCH#
The device capabilities are not enough for the set of input parameters provided.
-
enumerator NVTIFF_STATUS_INTERNAL_ERROR#
Unknown error occurred in the library.
-
enumerator NVTIFF_STATUS_NVCOMP_NOT_FOUND#
nvTIFF is unable to load the nvcomp library.
-
enumerator NVTIFF_STATUS_NVJPEG_NOT_FOUND#
nvTIFF is unable to load the nvjpeg library.
-
enumerator NVTIFF_STATUS_TAG_NOT_FOUND#
nvTIFF is unable to find information about the provided tag.
-
enumerator NVTIFF_STATUS_PARAMETER_OUT_OF_BOUNDS#
Provided parameter is outside the range of possible values.
-
enumerator NVTIFF_STATUS_NVJPEG2K_NOT_FOUND#
nvTIFF is unable to load the nvJPEG2000 library.
-
enumerator NVTIFF_STATUS_BATCH_INCOMPATIBLE#
Each region in a multi-region decode request is individually decodable, but the requested regions cannot execute as one compatible batch under the current batching rules. Distinct from invalid-parameter and single-image unsupported-image errors.
-
enumerator NVTIFF_STATUS_SUCCESS#
Device Allocator Interface#
-
typedef int (*nvtiffDeviceMallocAsync)(void *ctx, void **ptr, size_t size, cudaStream_t stream)#
Prototype for stream-ordered device memory allocation.
- Param ctx:
[in] User-defined context pointer.
- Param ptr:
[out] Pointer to allocated memory.
- Param size:
[in] Size in bytes to allocate.
- Param stream:
[in] CUDA stream for ordered allocation.
- Return:
0 on success, non-zero on failure.
-
typedef int (*nvtiffDeviceFreeAsync)(void *ctx, void *ptr, size_t size, cudaStream_t stream)#
Prototype for stream-ordered device memory deallocation.
- Param ctx:
[in] User-defined context pointer.
- Param ptr:
[in] Pointer to memory to free.
- Param size:
[in] Size in bytes that was allocated.
- Param stream:
[in] CUDA stream for ordered deallocation.
- Return:
0 on success, non-zero on failure.
-
struct nvtiffDeviceAllocator_t#
Custom device memory allocator interface.
Supports stream-ordered allocation and user-defined context information. When invoking the device allocators, nvTIFF will pass device_ctx as input.
Public Members
-
nvtiffDeviceMallocAsync device_malloc#
Device allocator callback.
-
nvtiffDeviceFreeAsync device_free#
Device free callback.
-
void *device_ctx#
User-defined context pointer.
-
nvtiffDeviceMallocAsync device_malloc#
Pinned Allocator Interface#
-
typedef int (*nvtiffPinnedMallocAsync)(void *ctx, void **ptr, size_t size, cudaStream_t stream)#
Prototype for stream-ordered pinned memory allocation.
- Param ctx:
[in] User-defined context pointer.
- Param ptr:
[out] Pointer to allocated memory.
- Param size:
[in] Size in bytes to allocate.
- Param stream:
[in] CUDA stream for ordered allocation.
- Return:
0 on success, non-zero on failure.
-
typedef int (*nvtiffPinnedFreeAsync)(void *ctx, void *ptr, size_t size, cudaStream_t stream)#
Prototype for stream-ordered pinned memory deallocation.
- Param ctx:
[in] User-defined context pointer.
- Param ptr:
[in] Pointer to memory to free.
- Param size:
[in] Size in bytes that was allocated.
- Param stream:
[in] CUDA stream for ordered deallocation.
- Return:
0 on success, non-zero on failure.
-
struct nvtiffPinnedAllocator_t#
Custom pinned memory allocator interface.
Supports stream-ordered allocation and user-defined context information. When invoking the pinned allocators, nvTIFF will pass pinned_ctx as input.
Public Members
-
nvtiffPinnedMallocAsync pinned_malloc#
Pinned allocator callback.
-
nvtiffPinnedFreeAsync pinned_free#
Pinned free callback.
-
void *pinned_ctx#
User-defined context pointer.
-
nvtiffPinnedMallocAsync pinned_malloc#
Handle Types#
-
typedef struct nvtiffEncoder *nvtiffEncoder_t#
Handle to opaque nvTIFF encoder instance.
-
typedef struct nvtiffEncodeParams *nvtiffEncodeParams_t#
Handle to opaque nvTIFF encode parameters.
-
typedef struct nvtiffDecoder *nvtiffDecoder_t#
Handle to opaque nvTIFF decoder instance.
Stores intermediate decode buffers used in decoding.
-
typedef struct nvtiffStream *nvtiffStream_t#
Handle to opaque nvTIFF stream instance.
Used for parsing a TIFF file. TIFF metadata can be extracted using parser APIs.
-
typedef struct nvtiffDecodeParams *nvtiffDecodeParams_t#
Handle to opaque decode parameters.
Used to specify decode output parameters such as region of interest and output format.
Image Info#
-
enum nvtiffVariant_t#
TIFF file format variant.
Values:
-
enumerator NVTIFF_REGULAR_TIFF#
Standard TIFF format (up to 4GB file size).
-
enumerator NVTIFF_BIG_TIFF#
BigTIFF format (supports files larger than 4GB).
-
enumerator NVTIFF_REGULAR_TIFF#
-
enum nvtiffSampleFormat_t#
Sample format types.
Corresponds to the SampleFormat (339) tag defined in the TIFF specification.
Values:
-
enumerator NVTIFF_SAMPLEFORMAT_UNKNOWN#
Unknown sample format.
-
enumerator NVTIFF_SAMPLEFORMAT_UINT#
Unsigned integer data.
-
enumerator NVTIFF_SAMPLEFORMAT_INT#
Signed integer data.
-
enumerator NVTIFF_SAMPLEFORMAT_IEEEFP#
IEEE floating point data.
-
enumerator NVTIFF_SAMPLEFORMAT_VOID#
Undefined data format.
-
enumerator NVTIFF_SAMPLEFORMAT_COMPLEXINT#
Complex integer data.
-
enumerator NVTIFF_SAMPLEFORMAT_COMPLEXIEEEFP#
Complex IEEE floating point data.
-
enumerator NVTIFF_SAMPLEFORMAT_UNKNOWN#
-
enum nvtiffPhotometricInt_t#
Photometric interpretation types.
Corresponds to the PhotometricInterpretation (262) tag defined in the TIFF specification.
Values:
-
enumerator NVTIFF_PHOTOMETRIC_UNKNOWN#
Unknown photometric interpretation.
-
enumerator NVTIFF_PHOTOMETRIC_MINISWHITE#
0 is white, max value is black.
-
enumerator NVTIFF_PHOTOMETRIC_MINISBLACK#
0 is black, max value is white.
-
enumerator NVTIFF_PHOTOMETRIC_RGB#
RGB color model.
-
enumerator NVTIFF_PHOTOMETRIC_PALETTE#
Color map indexed (palette color).
-
enumerator NVTIFF_PHOTOMETRIC_MASK#
Holdout mask.
-
enumerator NVTIFF_PHOTOMETRIC_SEPARATED#
Color separations (e.g., CMYK).
-
enumerator NVTIFF_PHOTOMETRIC_YCBCR#
YCbCr color space.
-
enumerator NVTIFF_PHOTOMETRIC_UNKNOWN#
-
enum nvtiffPlanarConfig_t#
Planar configuration types.
Corresponds to the PlanarConfiguration (284) tag defined in the TIFF specification.
Values:
-
enumerator NVTIFF_PLANARCONFIG_UNKNOWN#
Unknown planar configuration.
-
enumerator NVTIFF_PLANARCONFIG_CONTIG#
Chunky format (interleaved).
-
enumerator NVTIFF_PLANARCONFIG_SEPARATE#
Planar format (separate planes).
-
enumerator NVTIFF_PLANARCONFIG_UNKNOWN#
-
enum nvtiffCompression_t#
Compression types.
Corresponds to the Compression (259) tag defined in the TIFF specification.
Values:
-
enumerator NVTIFF_COMPRESSION_UNKNOWN#
Unknown compression.
-
enumerator NVTIFF_COMPRESSION_NONE#
No compression.
-
enumerator NVTIFF_COMPRESSION_LZW#
LZW compression.
-
enumerator NVTIFF_COMPRESSION_JPEG#
JPEG compression.
-
enumerator NVTIFF_COMPRESSION_ADOBE_DEFLATE#
Adobe Deflate compression.
-
enumerator NVTIFF_COMPRESSION_PACKBITS#
PackBits compression.
-
enumerator NVTIFF_COMPRESSION_DEFLATE#
Deflate compression.
-
enumerator NVTIFF_COMPRESSION_APERIO_JP2000_YCC#
Aperio JPEG2000 YCC compression.
-
enumerator NVTIFF_COMPRESSION_APERIO_JP2000_RGB#
Aperio JPEG2000 RGB compression.
-
enumerator NVTIFF_COMPRESSION_JP2000#
JPEG2000 compression.
-
enumerator NVTIFF_COMPRESSION_UNKNOWN#
-
enum nvtiffImageType#
Image type flags.
Corresponds to the NewSubfileType (254) tag defined in the TIFF specification.
Values:
-
enumerator NVTIFF_IMAGETYPE_REDUCED_IMAGE#
Reduced resolution version of another image.
-
enumerator NVTIFF_IMAGETYPE_PAGE#
Single page of a multi-page image.
-
enumerator NVTIFF_IMAGETYPE_MASK#
Transparency mask for another image.
-
enumerator NVTIFF_IMAGETYPE_ENUM_FORCE_UINT32#
Force enum to 32-bit.
-
enumerator NVTIFF_IMAGETYPE_REDUCED_IMAGE#
-
typedef uint32_t nvtiffImageType_t#
Image type storage type.
-
struct nvtiffImageInfo_t#
TIFF image metadata structure.
Contains metadata of an image stored in a TIFF file.
Public Members
-
nvtiffImageType_t image_type#
Image type flags from NewSubfileType tag.
-
uint32_t image_width#
Image width in pixels.
-
uint32_t image_height#
Image height in pixels.
-
nvtiffCompression_t compression#
Compression method used.
-
nvtiffPhotometricInt_t photometric_int#
Photometric interpretation.
-
nvtiffPlanarConfig_t planar_config#
Planar configuration.
-
uint16_t samples_per_pixel#
Number of samples (channels) per pixel.
-
uint16_t bits_per_pixel#
Total bits per pixel (sum of
bits_per_sample).
-
uint16_t bits_per_sample[(16)]#
Bits per sample for each channel.
-
nvtiffSampleFormat_t sample_format[(16)]#
Sample format for each channel.
-
nvtiffImageType_t image_type#
-
struct nvtiffStreamHeader_t#
TIFF file header information.
Describes the file as a whole, independent of any single image: the format variant and the offset of the first image (IFD).
Public Members
-
nvtiffVariant_t variant#
TIFF format variant (NVTIFF_REGULAR_TIFF or NVTIFF_BIG_TIFF).
-
size_t first_ifd_offset#
Offset of the first IFD, or NVTIFF_NO_IMAGE if the file contains no images.
-
nvtiffVariant_t variant#
Image Geometry#
-
enum nvtiffImageGeometryType_t#
Image geometry type.
Specifies whether a TIFF file uses strips or tiles.
Values:
-
enumerator NVTIFF_IMAGE_STRIPED#
Image is organized in strips.
-
enumerator NVTIFF_IMAGE_TILED#
Image is organized in tiles.
-
enumerator NVTIFF_IMAGE_STRIPED#
-
struct nvtiffImageGeometry_t#
Image geometry information.
Stores image geometry along with strip/tile dimensions. When the geometry type is
NVTIFF_IMAGE_STRIPED,strile_widthequalsimage_width.Public Members
-
nvtiffImageGeometryType_t type#
Geometry type (striped or tiled).
-
uint32_t image_depth#
Image depth (for 3D images).
-
uint32_t strile_width#
Strip/tile width (equals
image_widthfor strips).
-
uint32_t strile_height#
Strip/tile height.
-
uint32_t strile_depth#
Strip/tile depth (equals
image_depthfor strips).
-
uint32_t num_striles_per_plane#
Number of strips/tiles per plane.
-
uint32_t num_striles#
Total number of strips/tiles.
-
nvtiffImageGeometryType_t type#
JPEG Encode Options#
-
enum nvtiffJpegChromaSubsampling_t#
RGB chroma subsampling for JPEG encoding.
This option applies to 3-channel RGB JPEG encoding. Grayscale JPEG encoding always uses a single luminance channel.
Values:
-
enumerator NVTIFF_JPEG_CHROMA_SUBSAMPLING_DEFAULT#
Library default. Currently 4:2:0 for RGB input.
-
enumerator NVTIFF_JPEG_CHROMA_SUBSAMPLING_444#
No chroma subsampling. TIFF YCbCrSubSampling = {1, 1}.
-
enumerator NVTIFF_JPEG_CHROMA_SUBSAMPLING_422#
Horizontal chroma subsampling. TIFF YCbCrSubSampling = {2, 1}.
-
enumerator NVTIFF_JPEG_CHROMA_SUBSAMPLING_420#
Horizontal and vertical chroma subsampling. TIFF YCbCrSubSampling = {2, 2}.
-
enumerator NVTIFF_JPEG_CHROMA_SUBSAMPLING_DEFAULT#
-
struct nvtiffJpegEncodeOptions_t#
JPEG-specific encode options.
Zero-initialized options preserve nvTIFF’s default JPEG behavior: quality 90, optimized Huffman disabled, and 4:2:0 RGB chroma sampling.
qualitymay be 0 to select the default, or 1 through 100.optimized_huffmanis a boolean where 0 disables optimized Huffman coding and 1 enables it.Public Members
-
int quality#
JPEG quality, 0 for default or 1 through 100.
-
int optimized_huffman#
0 to disable optimized Huffman coding, 1 to enable it.
-
nvtiffJpegChromaSubsampling_t chroma_subsampling#
RGB chroma subsampling.
-
int quality#
Image Format#
-
enum nvtiffOutputFormat_t#
Decode output format types.
Used to specify the decode output format.
Values:
-
enumerator NVTIFF_OUTPUT_UNCHANGED_I#
Keep original format, interleaved channels.
-
enumerator NVTIFF_OUTPUT_RGB_I_UINT8#
Interleaved RGB with 8 bits per channel.
-
enumerator NVTIFF_OUTPUT_RGB_I_UINT16#
Interleaved RGB with 16 bits per channel.
-
enumerator NVTIFF_OUTPUT_UNCHANGED_I#
Image Data#
-
struct nvtiffImage_t#
Output image data structure.
Describes the device output buffers for one decoded region. nvtiffDecode and nvtiffDecodeCheckSupported take an array of these descriptors, one per effective region.
-
struct nvtiffDecodeRegion_t#
Source-free decode region descriptor.
Identifies one decode output: an image, selected by its IFD offset in the source stream, and an optional region of interest within that image. The descriptor carries no stream handle; the source stream is supplied to nvtiffDecode or nvtiffDecodeCheckSupported, and every region’s
ifd_offsetis interpreted in that stream’s address space.A full-image decode is expressed with
offset_x=offset_y= 0 andwidth=height= 0. Awidthorheightof 0 extends that dimension to the image edge from the given offset.Public Members
-
size_t ifd_offset#
IFD offset of the source image; 0 selects the first IFD.
-
int32_t offset_x#
Horizontal region offset from the top-left corner. Must be >= 0; negative values are reserved for future out-of-bounds ROI support and currently rejected with
NVTIFF_STATUS_INVALID_PARAMETER.
-
int32_t offset_y#
Vertical region offset from the top-left corner. Must be >= 0 (see
offset_x).
-
uint32_t width#
Region width in pixels, or 0 to extend to the image edge.
-
uint32_t height#
Region height in pixels, or 0 to extend to the image edge.
-
size_t ifd_offset#
Metadata#
-
enum nvtiffTagDataType_t#
TIFF tag data types as defined in the TIFF specification.
Values:
-
enumerator NVTIFF_TAG_TYPE_BYTE#
8-bit unsigned integer.
-
enumerator NVTIFF_TAG_TYPE_ASCII#
8-bit byte containing ASCII code (null-terminated).
-
enumerator NVTIFF_TAG_TYPE_SHORT#
16-bit unsigned integer.
-
enumerator NVTIFF_TAG_TYPE_LONG#
32-bit unsigned integer.
-
enumerator NVTIFF_TAG_TYPE_RATIONAL#
Two LONGs: numerator and denominator.
-
enumerator NVTIFF_TAG_TYPE_SBYTE#
8-bit signed integer.
-
enumerator NVTIFF_TAG_TYPE_UNDEFINED#
8-bit byte that may contain anything.
-
enumerator NVTIFF_TAG_TYPE_SSHORT#
16-bit signed integer.
-
enumerator NVTIFF_TAG_TYPE_SLONG#
32-bit signed integer.
-
enumerator NVTIFF_TAG_TYPE_SRATIONAL#
Two SLONGs: numerator and denominator.
-
enumerator NVTIFF_TAG_TYPE_FLOAT#
32-bit IEEE floating point.
-
enumerator NVTIFF_TAG_TYPE_DOUBLE#
64-bit IEEE floating point.
-
enumerator NVTIFF_TAG_TYPE_LONG8#
BigTIFF 64-bit unsigned integer.
-
enumerator NVTIFF_TAG_TYPE_SLONG8#
BigTIFF 64-bit signed integer.
-
enumerator NVTIFF_TAG_TYPE_IFD8#
BigTIFF 64-bit unsigned IFD offset.
-
enumerator NVTIFF_TAG_TYPE_BYTE#
GeoTIFF Metadata#
-
enum nvtiffGeoKey_t#
GeoTIFF key identifiers.
Corresponds to various geo keys listed in the GeoTIFF specification. User can refer to the GeoTIFF specification for additional details.
Values:
-
enumerator NVTIFF_GEOKEY_GT_MODEL_TYPE#
Model type.
-
enumerator NVTIFF_GEOKEY_GT_RASTER_TYPE#
Raster type.
-
enumerator NVTIFF_GEOKEY_GT_CITATION#
Citation.
-
enumerator NVTIFF_GEOKEY_GEODETIC_CRS#
Geodetic CRS.
-
enumerator NVTIFF_GEOKEY_GEODETIC_CITATION#
Geodetic citation.
-
enumerator NVTIFF_GEOKEY_GEODETIC_DATUM#
Geodetic datum.
-
enumerator NVTIFF_GEOKEY_PRIME_MERIDIAN#
Prime meridian.
-
enumerator NVTIFF_GEOKEY_GEOG_LINEAR_UNITS#
Geographic linear units.
-
enumerator NVTIFF_GEOKEY_GEOG_LINEAR_UNIT_SIZE#
Geographic linear unit size.
-
enumerator NVTIFF_GEOKEY_GEOG_ANGULAR_UNITS#
Geographic angular units.
-
enumerator NVTIFF_GEOKEY_GEOG_ANGULAR_UNIT_SIZE#
Geographic angular unit size.
-
enumerator NVTIFF_GEOKEY_ELLIPSOID#
Ellipsoid.
-
enumerator NVTIFF_GEOKEY_ELLIPSOID_SEMI_MAJOR_AXIS#
Ellipsoid semi-major axis.
-
enumerator NVTIFF_GEOKEY_ELLIPSOID_SEMI_MINOR_AXIS#
Ellipsoid semi-minor axis.
-
enumerator NVTIFF_GEOKEY_ELLIPSOID_INV_FLATTENING#
Ellipsoid inverse flattening.
-
enumerator NVTIFF_GEOKEY_GEOG_AZIMUTH_UNITS#
Geographic azimuth units.
-
enumerator NVTIFF_GEOKEY_PRIME_MERIDIAN_LONG#
Prime meridian longitude.
-
enumerator NVTIFF_GEOKEY_PROJECTED_CRS#
Projected CRS.
-
enumerator NVTIFF_GEOKEY_PROJECTED_CITATION#
Projected citation.
-
enumerator NVTIFF_GEOKEY_PROJECTION#
Projection.
-
enumerator NVTIFF_GEOKEY_PROJ_METHOD#
Projection method.
-
enumerator NVTIFF_GEOKEY_PROJ_LINEAR_UNITS#
Projection linear units.
-
enumerator NVTIFF_GEOKEY_PROJ_LINEAR_UNIT_SIZE#
Projection linear unit size.
-
enumerator NVTIFF_GEOKEY_PROJ_STD_PARALLEL1#
Standard parallel 1.
-
enumerator NVTIFF_GEOKEY_PROJ_STD_PARALLEL#
Standard parallel (alias for PROJ_STD_PARALLEL1).
-
enumerator NVTIFF_GEOKEY_PROJ_STD_PARALLEL2#
Standard parallel 2.
-
enumerator NVTIFF_GEOKEY_PROJ_NAT_ORIGIN_LONG#
Natural origin longitude.
-
enumerator NVTIFF_GEOKEY_PROJ_ORIGIN_LONG#
Origin longitude (alias for PROJ_NAT_ORIGIN_LONG).
-
enumerator NVTIFF_GEOKEY_PROJ_NAT_ORIGIN_LAT#
Natural origin latitude.
-
enumerator NVTIFF_GEOKEY_PROJ_ORIGIN_LAT#
Origin latitude (alias for PROJ_NAT_ORIGIN_LAT).
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_EASTING#
False easting.
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_NORTHING#
False northing.
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_ORIGIN_LONG#
False origin longitude.
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_ORIGIN_LAT#
False origin latitude.
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_ORIGIN_EASTING#
False origin easting.
-
enumerator NVTIFF_GEOKEY_PROJ_FALSE_ORIGIN_NORTHING#
False origin northing.
-
enumerator NVTIFF_GEOKEY_PROJ_CENTER_LONG#
Center longitude.
-
enumerator NVTIFF_GEOKEY_PROJ_CENTER_LAT#
Center latitude.
-
enumerator NVTIFF_GEOKEY_PROJ_CENTER_EASTING#
Center easting.
-
enumerator NVTIFF_GEOKEY_PROJ_CENTER_NORTHING#
Center northing.
-
enumerator NVTIFF_GEOKEY_PROJ_SCALE_AT_NAT_ORIGIN#
Scale at natural origin.
-
enumerator NVTIFF_GEOKEY_PROJ_SCALE_AT_ORIGIN#
Scale at origin (alias for PROJ_SCALE_AT_NAT_ORIGIN).
-
enumerator NVTIFF_GEOKEY_PROJ_SCALE_AT_CENTER#
Scale at center.
-
enumerator NVTIFF_GEOKEY_PROJ_AZIMUTH_ANGLE#
Azimuth angle.
-
enumerator NVTIFF_GEOKEY_PROJ_STRAIGHT_VERT_POLE_LONG#
Straight vertical pole longitude.
-
enumerator NVTIFF_GEOKEY_VERTICAL#
Vertical CRS.
-
enumerator NVTIFF_GEOKEY_VERTICAL_CITATION#
Vertical citation.
-
enumerator NVTIFF_GEOKEY_VERTICAL_DATUM#
Vertical datum.
-
enumerator NVTIFF_GEOKEY_VERTICAL_UNITS#
Vertical units.
-
enumerator NVTIFF_GEOKEY_BASE#
Reserved for private use.
-
enumerator NVTIFF_GEOKEY_END#
Maximum value.
-
enumerator NVTIFF_GEOKEY_GT_MODEL_TYPE#