libCZI
Reading and Writing CZI documents made easy
libCZI::JxrLibCompress Class Reference

#include <libCZI_compress.h>

Static Public Member Functions

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

Detailed Description

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.

Member Function Documentation

◆ Compress()

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

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_typeThe pixel type of the source bitmap.
widthWidth of the source bitmap in pixels.
heightHeight of the source bitmap in pixels.
strideThe stride of the source bitmap in bytes.
ptrDataPointer to the source bitmap.
parametersProperty 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.

The documentation for this class was generated from the following file: