nvtiffEncodeParamsSetTiffVariant()#

Sets the TIFF variant (regular or big tiff) for encoding. This API is optional, by default regular TIFF is used.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetTiffVariant(nvtiffEncodeParams_t params,
    const nvtiffVariant_t variant)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

const nvtiffVariant_t variant

Input

Host

Tiff variant (NVTIFF_REGULAR_TIFF or NVTIFF_BIG_TIFF)

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetImageInfo()#

Sets image information for encoding.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetImageInfo(nvtiffEncodeParams_t params,
    const nvtiffImageInfo_t* info)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

const nvtiffImageInfo_t* info

Input

Host

Pointer to image information structure

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

Note

It is absolutely necessary to set image width, image height, samples per pixel, bits per sample and sample format (for each sample in a pixel).

Note

Samples per pixel must be either 1 or 3.

Note

Photometric interpretation must be either NVTIFF_PHOTOMETRIC_RGB (if samples per pixel is 3), or NVTIFF_PHOTOMETRIC_MINISBLACK (if samples per pixel is 1). If initialized with NVTIFF_PHOTOMETRIC_UNKNOWN, it is automatically set to the correct value, based on samples per pixel.

Note

Sample format must be one of NVTIFF_SAMPLEFORMAT_UNKNOWN, NVTIFF_SAMPLEFORMAT_UINT, and NVTIFF_SAMPLEFORMAT_IEEEFP. It is by default NVTIFF_SAMPLEFORMAT_UNKNOWN if zero initialization is used nvtiffImageInfo_t info = {};.

Note

Planar configuration must be NVTIFF_PLANARCONFIG_CONTIG. It is automatically set to NVTIFF_PLANARCONFIG_CONTIG if initialized with NVTIFF_PLANARCONFIG_UNKNOWN.

Note

Compression must either be NVTIFF_COMPRESSION_LZW or NVTIFF_COMPRESSION_NONE. It is automatically set to NVTIFF_COMPRESSION_LZW if initialized with NVTIFF_COMPRESSION_UNKNOWN. However, if during encoding, it is found that LZW produces a larger bitstream than no compression, the compression is automatically set to NVTIFF_COMPRESSION_NONE instead.

nvtiffEncodeParamsSetImageGeometry()#

Sets strip size for encoding. This is optional, by default, strip size will be set to 8 KB.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetImageGeometry(nvtiffEncodeParams_t params,
    const nvtiffImageGeometry_t* info)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

const nvtiffImageGeometry_t* info

Input

Host

Pointer to image geometry structure

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

Note

Only the strile_height field (number of rows per strip) in nvtiffImageGeometry_t needs to be set, since for now we only support stripes and not tiles in the encoder.

nvtiffEncodeParamsSetInputs()#

Sets input image pointers for encoding.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetInputs(nvtiffEncodeParams_t params,
    uint8_t** images_d,
    uint32_t nImages)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

uint8_t** images_d

Input

Host

Host array of size nImages of pointers to device buffers

uint32_t nImages

Input

Host

Number of input images

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetGeoKey()#

Sets a GeoTIFF key with arbitrary type and value.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetGeoKey(nvtiffEncodeParams_t params,
    nvtiffGeoKey_t key,
    nvtiffGeoKeyDataType_t type,
    void* value,
    uint32_t valueSize,
    uint32_t count)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

nvtiffGeoKey_t key

Input

Host

GeoTIFF key to set

nvtiffGeoKeyDataType_t type

Input

Host

Data type of the key value

void* value

Input

Host

Pointer to key value

uint32_t valueSize

Input

Host

Size of individual value in bytes

uint32_t count

Input

Host

Number of values

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetTag()#

Sets a TIFF tag with specified type and value.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetTag(nvtiffEncodeParams_t params,
    uint16_t tag,
    nvtiffTagDataType type,
    void* value,
    uint32_t count)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

uint16_t tag

Input

Host

TIFF tag to set

nvtiffTagDataType type

Input

Host

Data type of tag value

void* value

Input

Host

Pointer to tag value

uint32_t count

Input

Host

Number of values

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetGeoKeySHORT()#

Sets a GeoTIFF key with SHORT value type.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetGeoKeySHORT(nvtiffEncodeParams_t params,
    nvtiffGeoKey_t key,
    uint16_t value,
    uint32_t count)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

nvtiffGeoKey_t key

Input

Host

GeoTIFF key to set

uint16_t value

Input

Host

SHORT value to set

uint32_t count

Input

Host

Number of values

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetGeoKeyDOUBLE()#

Sets a GeoTIFF key with DOUBLE value type.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetGeoKeyDOUBLE(nvtiffEncodeParams_t params,
    nvtiffGeoKey_t key,
    double value,
    uint32_t count)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

nvtiffGeoKey_t key

Input

Host

GeoTIFF key to set

double value

Input

Host

DOUBLE value to set

uint32_t count

Input

Host

Number of values

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes

nvtiffEncodeParamsSetGeoKeyASCII()#

Sets a GeoTIFF key with ASCII value type.

Signature:

nvtiffStatus_t nvtiffEncodeParamsSetGeoKeyASCII(nvtiffEncodeParams_t params,
    nvtiffGeoKey_t key,
    const char* value,
    uint32_t valueSize)

Parameters:

Parameter

Input/Output

Memory

Description

nvtiffEncodeParams_t params

Input

Host

Encode parameters handle

nvtiffGeoKey_t key

Input

Host

GeoTIFF key to set

const char* value

Input

Host

ASCII string value

uint32_t valueSize

Input

Host

Size of ASCII string including null terminator

Returns:

nvtiffStatus_t - An error code as specified in Decode API Return Status Codes