Class JxrLibCompress

Class JxrLibCompress#

Class Documentation#

class JxrLibCompress#

The functions found here deal with JXR-compression - as implemented by jxrlib (the JPEG XR Image Codec reference implementation library released by Microsoft under BSD-2-Clause License). Those functions are rather low-level, and the common theme is - given a source bitmap, create a blob (containing the compressed bitmap data) which is suitable to be placed in a subblock’s data.

Public Static Functions

static std::shared_ptr<IMemoryBlock> Compress(libCZI::PixelType pixel_type, std::uint32_t width, std::uint32_t height, std::uint32_t stride, const void *ptrData, const ICompressParameters *parameters)#

Compress the specified bitmap in “JXR”-format. This method will compress the specified source-bitmap according to the “JXR-scheme” to a newly allocated block of memory. Parameters controlling the operation are provided in an optional property bag.

Parameters:
  • pixel_type – The pixel type of the source bitmap.

  • width – Width of the source bitmap in pixels.

  • height – Height of the source bitmap in pixels.

  • stride – The stride of the source bitmap in bytes.

  • ptrData – Pointer to the source bitmap.

  • parameters – Property bag containing parameters controlling the operation. This argument can be null, in which case default parameters are used.

Returns:

A shared pointer to an object representing and owning a block of memory, containing the JXR-compressed bitmap.