The APIs under this category are used to initialize the decoding parameters as part of the :code:`nvtiffDecodeParams_t` handle. Once initialized, the handle can be passed as an input to :ref:`nvtiffdecodeimage-label` .. _nvtiffdecodeparamssetoutputformat-label: nvtiffDecodeParamsSetOutputFormat() """""""""""""""""""""""""""""""""""" Used to set the decode output format. See :ref:`nvtiffdecodeoutputformat-label` for details. The default value is :code:`NVTIFF_OUTPUT_UNCHANGED_I`. .. note:: When the photometric interpretation is :code:`NVTIFF_PHOTOMETRIC_YCBCR` and compression is :code:`NVTIFF_COMPRESSION_JPEG`, output format must be set to either :code:`NVTIFF_OUTPUT_RGB_I_UINT8` or :code:`NVTIFF_OUTPUT_RGB_I_UINT16`. .. note:: When the photometric interpretation is :code:`NVTIFF_PHOTOMETRIC_MASK`, only :code:`NVTIFF_OUTPUT_UNCHANGED_I` can be used. When setting the output format to :code:`NVTIFF_OUTPUT_UNCHANGED_I`- the size in bytes of the decode output buffer when bits_per_pixel is a multiple 8, should be :code:`image_width * image_height * (bits_per_pixel/8)` the size in bytes of the decode output buffer when bits_per_pixel is less than 8, should be :code:`(image_width * bits_per_pixel + 7)/8 * image_height` When setting the output to :code:`NVTIFF_OUTPUT_RGB_I_UINT8`- the size in bytes of the decode output buffer should be :code:`image_width * image_height * 3 * sizeof(uint8_t)` When setting the output to :code:`NVTIFF_OUTPUT_RGB_I_UINT16`- the size in bytes of the decode output buffer should be :code:`image_width * image_height * 3 * sizeof(uint16_t)` **Signature:** .. code-block:: cpp nvtiffStatus_t nvtiffDecodeParamsSetOutputFormat(nvtiffDecodeParams_t decode_params, nvtiffOutputFormat_t format); **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffDecodeParams_t decode_params - Input/Output - Host - Decode output parameters handle. * - nvtiffOutputFormat_t format - Input - Host - Output format value. Defaults to :code:`NVTIFF_OUTPUT_UNCHANGED_I`. **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffDecodeParamsSetROI() """"""""""""""""""""""""""" Used to set the region of interest for decoding. The entire image is decoded by default. • offset_x and offset_y should be greater than or equal to 0, and cannot exceed image width and height respectively. • offset_x + roi_width and offset_y + roi_height cannot exceed image width and image height respectively. • When image bitdepth is 1, offset_x and roi_width should be a multiple of 8 **Signature:** .. code-block:: cpp nvjpeg2kStatus_t nvtiffDecodeParamsSetROI(nvtiffDecodeParams_t decode_params, int32_t offset_x, int32_t offset_y, int32_t roi_width, int32_t roi_height) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffDecodeParams_t decode_params - Input/Output - Host - Decode output parameter handle * - int32_t offset_x - Input - Host - Image offset along the horizontal direction relative to the top left corner. * - int32_t offset_y - Input - Host - Image offset along the vertical direction relative to the top left corner. * - int32_t roi_width - Input - Host - Image width relative to offset_x * - int32_t roi_height - Input - Host - Image height relative to offset_y **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label`