grk::SIZMarker Class Reference

`#include <SIZMarker.h>`

## Public Member Functions

bool | read (CodeStreamDecompress *codeStream, uint8_t *headerData, uint16_t header_size)
| Decompress a SIZ marker (image and tile size)
bool | write (CodeStreamCompress *codeStream, BufferedStream *stream)
| Write the SIZ marker (image and tile size)

## Private Member Functions

void | subsampleAndReduceHeaderImageComponents (GrkImage *headerImage, const CodingParams *p_cp)
| Apply resolution reduction to header image components.

## Member Function Documentation

## read()

bool grk::SIZMarker::read | ( | CodeStreamDecompress * | codeStream,
|  | uint8_t * | headerData,
|  | uint16_t | header_size
| ) |  |

Decompress a SIZ marker (image and tile size)

Parameters

  codeStream | JPEG 2000 code stream.
  headerData | the data contained in the SIZ box.
  header_size | the size of the data contained in the SIZ marker.

References grk::DECOMPRESS_STATE_MH, grk::default_number_mcc_records, grk::default_number_mct_records, grk::CodeStream::getCodingParams(), grk::CodeStreamDecompress::getDecompressorState(), grk::CodeStreamDecompress::getHeaderImage(), grk::grk_calloc(), grk::GRK_ERROR(), GRK_IS_BROADCAST, GRK_IS_IMF, GRK_MAX_SUPPORTED_IMAGE_PRECISION, GRK_PROFILE_CINEMA_LTS, GRK_PROFILE_MASK, GRK_PROFILE_PART2, grk::grk_read(), grk::GRK_WARN(), grk::maxNumComponentsJ2K, grk::maxNumTilesJ2K, subsampleAndReduceHeaderImageComponents(), and grk::TileCodingParams::tccps.

Referenced by grk::CodeStreamDecompress::read_siz().

## subsampleAndReduceHeaderImageComponents()

void grk::SIZMarker::subsampleAndReduceHeaderImageComponents | ( | GrkImage * | headerImage,
|  | const CodingParams * | p_cp
| ) |  |

private

Apply resolution reduction to header image components.

Parameters

  headerImage | header image
  p_cp | the coding parameters from which to update the image.

References _grk_image::comps, grk::grk_read(), _grk_image::numcomps, _grk_image_comp::w, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.

Referenced by read().

## write()

bool grk::SIZMarker::write | ( | CodeStreamCompress * | codeStream,
|  | BufferedStream * | stream
| ) |  |

Write the SIZ marker (image and tile size)

Parameters

  codeStream | JPEG 2000 code stream
  stream | buffered stream.

References grk::CodeStream::getCodingParams(), grk::CodeStream::getHeaderImage(), grk::grk_read(), grk::J2K_MS_SIZ, grk::MARKER_BYTES, grk::BufferedStream::writeByte(), grk::BufferedStream::writeInt(), and grk::BufferedStream::writeShort().

Referenced by grk::CodeStreamCompress::write_siz().

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

- SIZMarker.h
- SIZMarker.cpp