Function libCZI::CreateBitmapFromSubBlockData

Function libCZI::CreateBitmapFromSubBlockData#

Function Documentation#

std::shared_ptr<IBitmapData> libCZI::CreateBitmapFromSubBlockData(libCZI::CompressionMode compression_mode, const void *pv, size_t size, libCZI::PixelType pixelType, std::uint32_t width, std::uint32_t height, const CreateBitmapOptions *options = nullptr)#

Creates a bitmap from raw sub-block payload data, bypassing the need for an ISubBlock object. This is the low-level counterpart of CreateBitmapFromSubBlock, intended for cases where the compressed data and its associated metadata are already available separately.

Parameters:
  • compression_mode – The compression mode identifying the codec of the data pointed to by pv.

  • pv – Pointer to the compressed data; must not be null.

  • size – The size of the compressed data in bytes.

  • pixelType – The pixel type of the bitmap to be decoded.

  • width – The width of the expected bitmap in pixels.

  • height – The height of the expected bitmap in pixels.

  • options – (Optional) Options for controlling the operation. This controls how discrepancies between the actual pixel data and the specified dimensions are handled. This argument may be null, in which case the resolution protocol is applied for all discrepancy types.

Returns:

The newly allocated bitmap containing the decoded image data.