grk::GrkImage Class Reference

`#include <GrkImage.h>`

Inheritance diagram for grk::GrkImage:

## Public Member Functions

| GrkImage ()
bool | subsampleAndReduce (uint32_t reduce)
bool | allocCompositeData (void)
| Allocate data for tile compositing.
bool | supportsStripCache (CodingParams *cp)
void | copyHeader (GrkImage *dest)
| Copy only header of image and its component header (no data are copied) if dest image have data, they will be freed.
void | transferDataTo (GrkImage *dest)
| Transfer data to dest for each component, and null out "this" data.
void | transferDataFrom (const Tile *tile_src_data)
GrkImage * | duplicate (const Tile *tile_src)
| Create new image and transfer tile buffer data.
bool | composite (const GrkImage *src)
bool | compositeInterleaved (const GrkImage *src)
| Interleave image data and copy to interleaved composite image.
bool | compositeInterleaved (const Tile *src, uint32_t yBegin, uint32_t yEnd)
| Interleave strip of tile data and copy to interleaved composite image.
bool | greyToRGB (void)
bool | convertToRGB (bool wholeTileDecompress)
bool | applyColourManagement (void)
| Convert to sRGB.
bool | applyICC (void)
bool | validateICC (void)
void | convertPrecision (void)
bool | execUpsample (void)
void | all_components_data_free (void)
void | postReadHeader (CodingParams *cp)
void | validateColourSpace (void)
bool | isSubsampled ()
bool | validateZeroed (void)
bool | applyColour (void)
bool | apply_palette_clr (void)
bool | check_color (void)
void | apply_channel_definition (void)
void | allocPalette (uint8_t num_channels, uint16_t num_entries)
uint32_t | width (void) const
uint32_t | height (void) const
void | print (void) const
bool | componentsEqual (bool checkPrecision)
bool | componentsEqual (uint16_t firstNComponents, bool checkPrecision)

## Static Public Member Functions

static GrkImage * | create (grk_image *src, uint16_t numcmpts, grk_image_comp *cmptparms, GRK_COLOR_SPACE clrspc, bool doAllocation)
| Create image.
static bool | allocData (grk_image_comp *imageComp, bool clear)
| Allocate data for single image component.
static bool | allocData (grk_image_comp *imageComp)

## Private Member Functions

| ~GrkImage ()
std::string | getColourSpaceString (void)
std::string | getICCColourSpaceString (cmsColorSpaceSignature color_space)
bool | isValidICCColourSpace (uint32_t signature)
bool | needsConversionToRGB (void)
bool | isOpacity (uint16_t compno)
bool | compositePlanar (const GrkImage *srcImg)
| Copy planar image data to planar composite image.
bool | generateCompositeBounds (const grk_image_comp *srcComp, uint16_t destCompno, grk_rect32 *destWin)
bool | generateCompositeBounds (grk_rect32 src, uint16_t destCompno, grk_rect32 *destWin)
bool | allComponentsSanityCheck (bool equalPrecision)
| return false if :
grk_image * | createRGB (uint16_t numcmpts, uint32_t w, uint32_t h, uint8_t prec)
void | sycc_to_rgb (int32_t offset, int32_t upb, int32_t y, int32_t cb, int32_t cr, int32_t *out_r, int32_t *out_g, int32_t *out_b)
bool | sycc444_to_rgb (void)
bool | sycc422_to_rgb (bool oddFirstX)
bool | sycc420_to_rgb (bool oddFirstX, bool oddFirstY)
bool | color_sycc_to_rgb (bool oddFirstX, bool oddFirstY)
bool | color_cmyk_to_rgb (void)
bool | color_esycc_to_rgb (void)
bool | cieLabToRGB (void)
bool | componentsEqual (grk_image_comp *src, grk_image_comp *dest, bool checkPrecision)
void | scaleComponent (grk_image_comp *component, uint8_t precision)

## Static Private Member Functions

static void | single_component_data_free (grk_image_comp *comp)
static void | copyComponent (grk_image_comp *src, grk_image_comp *dest)

## Private Attributes

friend | GrkObjectWrapperImpl< GrkImage >

## Additional Inherited Members

Public Attributes inherited from _grk_image
grk_object | obj
uint32_t | x0
| XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
uint32_t | y0
| YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
uint32_t | x1
| Xsiz: width of the reference grid.
uint32_t | y1
| Ysiz: height of the reference grid.
uint16_t | numcomps
| number of components in the image
GRK_COLOR_SPACE | color_space
bool | paletteApplied_
bool | channelDefinitionApplied_
bool | has_capture_resolution
double | capture_resolution [2]
bool | has_display_resolution
double | display_resolution [2]
GRK_SUPPORTED_FILE_FMT | decompressFormat
bool | forceRGB
bool | upsample
grk_precision * | precision
uint32_t | numPrecision
bool | hasMultipleTiles
bool | splitByComponent
uint16_t | decompressNumComps
uint32_t | decompressWidth
uint32_t | decompressHeight
uint8_t | decompressPrec
GRK_COLOR_SPACE | decompressColourSpace
grk_io_buf | interleavedData
uint32_t | rowsPerStrip
uint32_t | rowsPerTask
uint64_t | packedRowBytes
grk_image_meta * | meta
grk_image_comp * | comps

## Constructor & Destructor Documentation

## GrkImage()

grk::GrkImage::GrkImage | ( |  | ) |

References grk::grk_read(), _grk_image::obj, _grk_image::rowsPerTask, grk::singleTileRowsPerStrip, and _grk_object::wrapper.

Referenced by create(), and duplicate().

## ~GrkImage()

grk::GrkImage::~GrkImage | ( |  | ) |

private

References all_components_data_free(), _grk_image::comps, _grk_io_buf::data_, grk::grk_aligned_free(), grk_object_unref(), _grk_image::interleavedData, _grk_image::meta, and _grk_image_meta::obj.

## Member Function Documentation

## all_components_data_free()

void grk::GrkImage::all_components_data_free | ( | void |  | ) |

References _grk_image::comps, grk::grk_read(), _grk_image::numcomps, and single_component_data_free().

Referenced by copyHeader(), execUpsample(), greyToRGB(), sycc420_to_rgb(), sycc422_to_rgb(), sycc444_to_rgb(), and ~GrkImage().

## allComponentsSanityCheck()

bool grk::GrkImage::allComponentsSanityCheck | ( | bool | equalPrecision | ) |

private

return false if :

1. any component's data buffer is NULL
2. any component's precision is either 0 or greater than GRK_MAX_SUPPORTED_IMAGE_PRECISION
3. any component's signedness does not match another component's signedness
4. any component's precision does not match another component's precision
5. any component's width,stride or height does not match another component's width,stride or height (if equalPrecision is true)

References _grk_image::comps, grk::GRK_ERROR(), GRK_MAX_SUPPORTED_IMAGE_PRECISION, grk::grk_read(), grk::GRK_WARN(), and _grk_image::numcomps.

Referenced by applyICC(), cieLabToRGB(), color_cmyk_to_rgb(), and color_esycc_to_rgb().

## allocCompositeData()

bool grk::GrkImage::allocCompositeData | ( | void |  | ) |

Allocate data for tile compositing.

Returns
  true if successful

References allocData(), _grk_image::comps, grk::GRK_ERROR(), grk::grk_read(), _grk_image::hasMultipleTiles, and _grk_image::numcomps.

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

## allocData() [1/2]

bool grk::GrkImage::allocData | ( | grk_image_comp * | imageComp | ) |

static

References allocData(), and grk::grk_read().

## allocData() [2/2]

bool grk::GrkImage::allocData | ( | grk_image_comp * | imageComp,
|  | bool | clear
| ) |  |

static

Allocate data for single image component.

Parameters

  imageComp | image component

Returns
  true if successful

References grk::grk_aligned_malloc(), grk::GRK_ERROR(), grk::grk_make_aligned_width(), grk::grk_read(), and single_component_data_free().

Referenced by allocCompositeData(), allocData(), apply_palette_clr(), applyICC(), create(), execUpsample(), and greyToRGB().

## allocPalette()

void grk::GrkImage::allocPalette | ( | uint8_t | num_channels,
|  | uint16_t | num_entries
| ) |  |

References _grk_image::meta.

Referenced by grk::FileFormatDecompress::read_palette_clr().

## apply_channel_definition()

void grk::GrkImage::apply_channel_definition | ( | void |  | ) |

References _grk_color::channel_definition, _grk_image::channelDefinitionApplied_, _grk_image_meta::color, _grk_image::comps, _grk_channel_definition::descriptions, GRK_CHANNEL_ASSOC_WHOLE_IMAGE, GRK_CHANNEL_TYPE_COLOUR, grk::grk_read(), grk::GRK_WARN(), _grk_image::meta, _grk_channel_definition::num_channel_descriptions, _grk_image::numcomps, and _grk_image_comp::type.

Referenced by applyColour().

## apply_palette_clr()

bool grk::GrkImage::apply_palette_clr | ( | void |  | ) |

References allocData(), _grk_palette_data::channel_prec, _grk_image_meta::color, _grk_image::comps, grk::grk_aligned_free(), grk::GRK_ERROR(), grk::grk_read(), _grk_image::meta, _grk_image::numcomps, _grk_color::palette, _grk_image::paletteApplied_, and single_component_data_free().

Referenced by applyColour().

## applyColour()

bool grk::GrkImage::applyColour | ( | void |  | ) |

References apply_channel_definition(), apply_palette_clr(), _grk_color::channel_definition, _grk_image_meta::color, _grk_palette_data::component_mapping, _grk_image::meta, and _grk_color::palette.

## applyColourManagement()

bool grk::GrkImage::applyColourManagement | ( | void |  | ) |

Convert to sRGB.

References applyICC(), cieLabToRGB(), _grk_image_meta::color, _grk_image::color_space, _grk_image::decompressFormat, _grk_image::forceRGB, GRK_CLRSPC_CUSTOM_CIE, GRK_CLRSPC_DEFAULT_CIE, grk::GRK_ERROR(), GRK_FMT_BMP, GRK_FMT_JPG, GRK_FMT_PNG, GRK_FMT_TIF, GRK_FMT_UNK, grk::grk_read(), grk::GRK_WARN(), _grk_color::icc_profile_buf, _grk_image::meta, and validateICC().

## applyICC()

bool grk::GrkImage::applyICC | ( | void |  | ) |

References allComponentsSanityCheck(), allocData(), _grk_image_meta::color, _grk_image::color_space, _grk_image::comps, _grk_image_comp::data, _grk_image::forceRGB, GRK_CLRSPC_GRAY, GRK_CLRSPC_SRGB, grk::grk_read(), grk::GRK_WARN(), _grk_image_comp::h, _grk_color::icc_profile_buf, _grk_color::icc_profile_len, _grk_image::meta, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::stride, validateICC(), and _grk_image_comp::w.

Referenced by applyColourManagement(), and grk::CodeStreamCompress::init().

## check_color()

bool grk::GrkImage::check_color | ( | void |  | ) |

References _grk_color::channel_definition, _grk_image_meta::color, _grk_channel_definition::descriptions, grk::grk_calloc(), GRK_CHANNEL_ASSOC_UNASSOCIATED, grk::GRK_ERROR(), grk::grk_free(), grk::grk_read(), grk::GRK_WARN(), _grk_image::meta, and _grk_image::numcomps.

## cieLabToRGB()

bool grk::GrkImage::cieLabToRGB | ( | void |  | ) |

private

References allComponentsSanityCheck(), _grk_image_meta::color, _grk_image::color_space, _grk_image::comps, createRGB(), _grk_image_comp::data, GRK_CIE_D50, GRK_CIE_D65, GRK_CIE_D75, GRK_CIE_F11, GRK_CIE_F2, GRK_CIE_F7, GRK_CIE_SA, GRK_CIE_SC, GRK_CLRSPC_SRGB, GRK_DEFAULT_CIELAB_SPACE, GRK_ENUM_CLRSPC_CIE, grk_object_unref(), grk::grk_read(), grk::GRK_WARN(), _grk_image_comp::h, _grk_color::icc_profile_buf, _grk_image::meta, _grk_image::numcomps, _grk_image_comp::prec, single_component_data_free(), _grk_image_comp::stride, and _grk_image_comp::w.

Referenced by applyColourManagement().

## color_cmyk_to_rgb()

bool grk::GrkImage::color_cmyk_to_rgb | ( | void |  | ) |

private

References allComponentsSanityCheck(), _grk_image::color_space, _grk_image::comps, _grk_image_comp::data, GRK_CLRSPC_SRGB, grk::grk_read(), _grk_image_comp::h, _grk_image::numcomps, _grk_image_comp::prec, single_component_data_free(), _grk_image_comp::stride, and _grk_image_comp::w.

Referenced by convertToRGB().

## color_esycc_to_rgb()

bool grk::GrkImage::color_esycc_to_rgb | ( | void |  | ) |

private

References allComponentsSanityCheck(), _grk_image::color_space, _grk_image::comps, _grk_image_comp::data, GRK_CLRSPC_SRGB, grk::grk_read(), _grk_image_comp::h, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::sgnd, _grk_image_comp::stride, and _grk_image_comp::w.

Referenced by convertToRGB().

## color_sycc_to_rgb()

bool grk::GrkImage::color_sycc_to_rgb | ( | bool | oddFirstX,
|  | bool | oddFirstY
| ) |  |

private

References _grk_image::color_space, _grk_image::comps, GRK_CLRSPC_SRGB, grk::grk_read(), grk::GRK_WARN(), _grk_image::numcomps, sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().

Referenced by convertToRGB().

## componentsEqual() [1/3]

bool grk::GrkImage::componentsEqual | ( | bool | checkPrecision | ) |

References componentsEqual(), grk::grk_read(), and _grk_image::numcomps.

Referenced by componentsEqual(), componentsEqual(), grk::TileProcessor::needsMctDecompress(), and supportsStripCache().

## componentsEqual() [2/3]

bool grk::GrkImage::componentsEqual | ( | grk_image_comp * | src,
|  | grk_image_comp * | dest,
|  | bool | checkPrecision
| ) |  |

private

References grk::grk_read().

## componentsEqual() [3/3]

bool grk::GrkImage::componentsEqual | ( | uint16_t | firstNComponents,
|  | bool | checkPrecision
| ) |  |

References componentsEqual(), _grk_image::comps, and grk::grk_read().

## composite()

bool grk::GrkImage::composite | ( | const GrkImage * | src | ) |

References compositeInterleaved(), compositePlanar(), _grk_io_buf::data_, grk::grk_read(), and _grk_image::interleavedData.

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

## compositeInterleaved() [1/2]

bool grk::GrkImage::compositeInterleaved | ( | const GrkImage * | src | ) |

Interleave image data and copy to interleaved composite image.

Parameters

  src | source image

Returns
  : true if successful

References _grk_image::comps, _grk_io_buf::data_, _grk_image::decompressFormat, generateCompositeBounds(), GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), grk::GRK_WARN(), and _grk_image::interleavedData.

Referenced by composite().

## compositeInterleaved() [2/2]

bool grk::GrkImage::compositeInterleaved | ( | const Tile * | src,
|  | uint32_t | yBegin,
|  | uint32_t | yEnd
| ) |  |

Interleave strip of tile data and copy to interleaved composite image.

Parameters

  srcImg | source image

Returns
  : true if successful

References _grk_image::comps, _grk_io_buf::data_, _grk_image::decompressFormat, generateCompositeBounds(), GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), grk::GRK_WARN(), and _grk_image::interleavedData.

## compositePlanar()

bool grk::GrkImage::compositePlanar | ( | const GrkImage * | src | ) |

private

Copy planar image data to planar composite image.

Parameters

  src | source image

Returns
  : true if successful

References _grk_image::comps, generateCompositeBounds(), grk::grk_read(), and grk::GRK_WARN().

Referenced by composite().

## convertPrecision()

void grk::GrkImage::convertPrecision | ( | void |  | ) |

References _grk_image::comps, _grk_image::decompressFormat, GRK_FMT_JPG, GRK_FMT_PNG, GRK_PREC_MODE_CLIP, GRK_PREC_MODE_SCALE, grk::grk_read(), grk::GRK_WARN(), _grk_image::numcomps, _grk_image::numPrecision, _grk_precision::prec, _grk_image_comp::prec, _grk_image::precision, and scaleComponent().

## convertToRGB()

bool grk::GrkImage::convertToRGB | ( | bool | wholeTileDecompress | ) |

References color_cmyk_to_rgb(), color_esycc_to_rgb(), _grk_image::color_space, color_sycc_to_rgb(), GRK_CLRSPC_CMYK, GRK_CLRSPC_EYCC, GRK_CLRSPC_SYCC, grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), needsConversionToRGB(), _grk_image::numcomps, _grk_image::x0, and _grk_image::y0.

## copyComponent()

void grk::GrkImage::copyComponent | ( | grk_image_comp * | src,
|  | grk_image_comp * | dest
| ) |  |

static private

References grk::grk_read().

Referenced by execUpsample(), and greyToRGB().

## copyHeader()

void grk::GrkImage::copyHeader | ( | GrkImage * | dest | ) |

Copy only header of image and its component header (no data are copied) if dest image have data, they will be freed.

Copy only header of image and its component header (no data copied) if dest image has data, it will be freed.

Parameters

  dest | the dest image

References all_components_data_free(), _grk_image::capture_resolution, _grk_image::color_space, _grk_image::comps, _grk_image::decompressColourSpace, _grk_image::decompressFormat, _grk_image::decompressHeight, _grk_image::decompressNumComps, _grk_image::decompressPrec, _grk_image::decompressWidth, _grk_image::display_resolution, _grk_image::forceRGB, grk_object_ref(), grk::grk_read(), _grk_image::has_capture_resolution, _grk_image::has_display_resolution, _grk_image::hasMultipleTiles, _grk_image::meta, _grk_image::numcomps, _grk_image::numPrecision, _grk_image::packedRowBytes, _grk_image::precision, _grk_image::rowsPerStrip, _grk_image::upsample, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.

Referenced by grk::CodeStreamDecompress::createOutputImage(), grk::CodeStreamDecompress::decompressTile(), duplicate(), grk::CodeStreamCompress::init(), and grk::CodeStreamDecompress::readHeader().

## create()

GrkImage * grk::GrkImage::create | ( | grk_image * | src,
|  | uint16_t | numcmpts,
|  | grk_image_comp * | cmptparms,
|  | GRK_COLOR_SPACE | clrspc,
|  | bool | doAllocation
| ) |  |

static

Create image.

Parameters

  numcmpts | number of components
  cmptparms | component parameters
  clrspc | image color space
  doAllocation | true if data is to be allocated, otherwise false

Returns
  a new image if successful, otherwise nullptr

References allocData(), GRK_CHANNEL_ASSOC_COLOUR_1, GRK_CHANNEL_ASSOC_COLOUR_2, GRK_CHANNEL_ASSOC_COLOUR_3, GRK_CHANNEL_ASSOC_UNASSOCIATED, GRK_CHANNEL_TYPE_COLOUR, GRK_CHANNEL_TYPE_UNSPECIFIED, GRK_CLRSPC_CMYK, grk::GRK_ERROR(), grk::grk_read(), and GrkImage().

Referenced by createRGB(), and grk_image_new().

## createRGB()

grk_image * grk::GrkImage::createRGB | ( | uint16_t | numcmpts,
|  | uint32_t | w,
|  | uint32_t | h,
|  | uint8_t | prec
| ) |  |

private

References create(), GRK_CLRSPC_SRGB, grk::grk_read(), and grk::GRK_WARN().

Referenced by cieLabToRGB(), sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().

## duplicate()

GrkImage * grk::GrkImage::duplicate | ( | const Tile * | src | ) |

Create new image and transfer tile buffer data.

Parameters

  src | tile source

Returns
  new GrkImage if successful

References copyHeader(), grk::grk_read(), and GrkImage().

Referenced by grk::TileProcessor::generateImage().

## execUpsample()

bool grk::GrkImage::execUpsample | ( | void |  | ) |

References all_components_data_free(), allocData(), _grk_image::comps, copyComponent(), _grk_image_comp::data, grk::GRK_ERROR(), grk::grk_read(), _grk_image::numcomps, _grk_image::upsample, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.

## generateCompositeBounds() [1/2]

bool grk::GrkImage::generateCompositeBounds | ( | const grk_image_comp * | srcComp,
|  | uint16_t | destCompno,
|  | grk_rect32 * | destWin
| ) |  |

private

References generateCompositeBounds(), and grk::grk_read().

Referenced by compositeInterleaved(), compositeInterleaved(), compositePlanar(), and generateCompositeBounds().

## generateCompositeBounds() [2/2]

bool grk::GrkImage::generateCompositeBounds | ( | grk_rect32 | src,
|  | uint16_t | destCompno,
|  | grk_rect32 * | destWin
| ) |  |

private

References _grk_image::comps, and grk::grk_read().

## getColourSpaceString()

std::string grk::GrkImage::getColourSpaceString | ( | void |  | ) |

private

References _grk_image::color_space, GRK_CLRSPC_CMYK, GRK_CLRSPC_CUSTOM_CIE, GRK_CLRSPC_DEFAULT_CIE, GRK_CLRSPC_EYCC, GRK_CLRSPC_GRAY, GRK_CLRSPC_ICC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, GRK_CLRSPC_UNKNOWN, and grk::grk_read().

Referenced by validateICC().

## getICCColourSpaceString()

std::string grk::GrkImage::getICCColourSpaceString | ( | cmsColorSpaceSignature | color_space | ) |

private

References _grk_image::color_space, and grk::grk_read().

Referenced by validateICC().

## greyToRGB()

bool grk::GrkImage::greyToRGB | ( | void |  | ) |

References all_components_data_free(), allocData(), _grk_image::color_space, _grk_image::comps, copyComponent(), _grk_image_comp::data, _grk_image::forceRGB, GRK_CLRSPC_GRAY, GRK_CLRSPC_SRGB, grk::grk_read(), _grk_image_comp::h, _grk_image::numcomps, and _grk_image_comp::stride.

## height()

uint32_t grk::GrkImage::height | ( | void |  | ) | const

References _grk_image::y0, and _grk_image::y1.

Referenced by grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), and postReadHeader().

## isOpacity()

bool grk::GrkImage::isOpacity | ( | uint16_t | compno | ) |

private

References _grk_image::comps, GRK_CHANNEL_TYPE_OPACITY, GRK_CHANNEL_TYPE_PREMULTIPLIED_OPACITY, grk::grk_read(), and _grk_image::numcomps.

Referenced by postReadHeader().

## isSubsampled()

bool grk::GrkImage::isSubsampled | ( |  | ) |

References _grk_image::comps, grk::grk_read(), and _grk_image::numcomps.

Referenced by postReadHeader(), supportsStripCache(), and validateICC().

## isValidICCColourSpace()

bool grk::GrkImage::isValidICCColourSpace | ( | uint32_t | signature | ) |

private

References grk::grk_read().

Referenced by validateICC().

## needsConversionToRGB()

bool grk::GrkImage::needsConversionToRGB | ( | void |  | ) |

private

References _grk_image::color_space, _grk_image::decompressFormat, _grk_image::forceRGB, GRK_CLRSPC_CMYK, GRK_CLRSPC_EYCC, GRK_CLRSPC_SYCC, GRK_FMT_TIF, and GRK_FMT_UNK.

Referenced by convertToRGB(), postReadHeader(), and supportsStripCache().

## postReadHeader()

void grk::GrkImage::postReadHeader | ( | CodingParams * | cp | ) |

References grk::ceildivpow2(), grk::CodingParams::coding_params_, _grk_image_meta::color, _grk_image::color_space, _grk_image::comps, grk::CodingParams::dec_, _grk_image::decompressColourSpace, _grk_image::decompressFormat, _grk_image::decompressHeight, _grk_image::decompressNumComps, _grk_image::decompressPrec, _grk_image::decompressWidth, _grk_image_comp::dx, _grk_image_comp::dy, _grk_image::forceRGB, GRK_CLRSPC_EYCC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, GRK_FMT_BMP, GRK_FMT_PNG, GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), _grk_image_comp::h, _grk_image::hasMultipleTiles, height(), _grk_color::icc_profile_buf, _grk_color::icc_profile_len, _grk_color::icc_profile_name, isOpacity(), isSubsampled(), _grk_image::meta, needsConversionToRGB(), _grk_palette_data::num_channels, _grk_image::numcomps, _grk_image::packedRowBytes, _grk_color::palette, _grk_precision::prec, _grk_image_comp::prec, _grk_image::precision, grk::DecodingParams::reduce_, _grk_image::rowsPerStrip, grk::singleTileRowsPerStrip, grk::CodingParams::t_height, _grk_image::upsample, _grk_image_comp::w, _grk_image::x0, _grk_image::x1, _grk_image::y0, and _grk_image::y1.

## print()

void grk::GrkImage::print | ( | void |  | ) | const

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

## scaleComponent()

void grk::GrkImage::scaleComponent | ( | grk_image_comp * | component,
|  | uint8_t | precision
| ) |  |

private

References grk::grk_read(), _grk_precision::prec, _grk_image::precision, and grk::scale.

Referenced by convertPrecision().

## single_component_data_free()

void grk::GrkImage::single_component_data_free | ( | grk_image_comp * | comp | ) |

static private

References grk::grk_aligned_free(), and grk::grk_read().

Referenced by all_components_data_free(), allocData(), apply_palette_clr(), cieLabToRGB(), color_cmyk_to_rgb(), transferDataFrom(), and transferDataTo().

## subsampleAndReduce()

bool grk::GrkImage::subsampleAndReduce | ( | uint32_t | reduce | ) |

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

## supportsStripCache()

bool grk::GrkImage::supportsStripCache | ( | CodingParams * | cp | ) |

References _grk_image_meta::color, componentsEqual(), _grk_image::comps, _grk_image::decompressFormat, GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), _grk_image::hasMultipleTiles, _grk_color::icc_profile_buf, isSubsampled(), _grk_image::meta, needsConversionToRGB(), _grk_image::numcomps, _grk_color::palette, _grk_image_comp::prec, _grk_image::precision, _grk_image::splitByComponent, grk::CodingParams::t_height, grk::CodingParams::t_width, grk::CodingParams::ty0, _grk_image::upsample, grk::CodingParams::wholeTileDecompress_, and _grk_image::y0.

Referenced by grk::CodeStreamDecompress::createOutputImage(), grk::CodeStreamDecompress::decompressTile(), and grk::CodeStreamDecompress::decompressTiles().

## sycc420_to_rgb()

bool grk::GrkImage::sycc420_to_rgb | ( | bool | oddFirstX,
|  | bool | oddFirstY
| ) |  |

private

References all_components_data_free(), _grk_image::color_space, _grk_image::comps, createRGB(), _grk_image_comp::data, _grk_image_comp::dx, _grk_image_comp::dy, GRK_CLRSPC_SRGB, grk_object_unref(), grk::grk_read(), grk::GRK_WARN(), _grk_image_comp::h, _grk_image_comp::prec, _grk_image_comp::stride, sycc_to_rgb(), and _grk_image_comp::w.

Referenced by color_sycc_to_rgb().

## sycc422_to_rgb()

bool grk::GrkImage::sycc422_to_rgb | ( | bool | oddFirstX | ) |

private

References all_components_data_free(), _grk_image::color_space, _grk_image::comps, createRGB(), _grk_image_comp::data, _grk_image_comp::dx, _grk_image_comp::dy, GRK_CLRSPC_SRGB, grk_object_unref(), grk::grk_read(), grk::GRK_WARN(), _grk_image_comp::h, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::stride, sycc_to_rgb(), and _grk_image_comp::w.

Referenced by color_sycc_to_rgb().

## sycc444_to_rgb()

bool grk::GrkImage::sycc444_to_rgb | ( | void |  | ) |

private

References all_components_data_free(), _grk_image::color_space, _grk_image::comps, createRGB(), _grk_image_comp::data, GRK_CLRSPC_SRGB, grk_object_unref(), grk::grk_read(), _grk_image_comp::h, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::stride, sycc_to_rgb(), and _grk_image_comp::w.

Referenced by color_sycc_to_rgb().

## sycc_to_rgb()

void grk::GrkImage::sycc_to_rgb | ( | int32_t | offset,
|  | int32_t | upb,
|  | int32_t | y,
|  | int32_t | cb,
|  | int32_t | cr,
|  | int32_t * | out_r,
|  | int32_t * | out_g,
|  | int32_t * | out_b
| ) |  |

private

References grk::grk_read().

Referenced by sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().

## transferDataFrom()

void grk::GrkImage::transferDataFrom | ( | const Tile * | tile_src_data | ) |

References _grk_image::comps, grk::grk_read(), _grk_image::numcomps, and single_component_data_free().

## transferDataTo()

void grk::GrkImage::transferDataTo | ( | GrkImage * | dest | ) |

Transfer data to dest for each component, and null out "this" data.

Transfer data to dest for each component, and null out this data.

Assumption: "this" and dest have the same number of components

Assumption: this and dest have the same number of components

References _grk_image::comps, _grk_io_buf::data_, grk::grk_read(), _grk_image::interleavedData, _grk_image::numcomps, and single_component_data_free().

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

## validateColourSpace()

void grk::GrkImage::validateColourSpace | ( | void |  | ) |

References _grk_image::color_space, _grk_image::comps, GRK_CLRSPC_SYCC, GRK_CLRSPC_UNKNOWN, and _grk_image::numcomps.

## validateICC()

bool grk::GrkImage::validateICC | ( | void |  | ) |

References _grk_image_meta::color, _grk_image::color_space, _grk_image::comps, _grk_image_comp::dx, getColourSpaceString(), getICCColourSpaceString(), GRK_CLRSPC_CMYK, GRK_CLRSPC_CUSTOM_CIE, GRK_CLRSPC_DEFAULT_CIE, GRK_CLRSPC_EYCC, GRK_CLRSPC_GRAY, GRK_CLRSPC_ICC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, GRK_CLRSPC_UNKNOWN, grk::grk_read(), grk::GRK_WARN(), _grk_color::icc_profile_buf, _grk_color::icc_profile_len, isSubsampled(), isValidICCColourSpace(), _grk_image::meta, and _grk_image::numcomps.

Referenced by applyColourManagement(), applyICC(), and grk::FileFormatCompress::init().

## validateZeroed()

bool grk::GrkImage::validateZeroed | ( | void |  | ) |

References _grk_image::comps, grk::grk_read(), and _grk_image::numcomps.

## width()

uint32_t grk::GrkImage::width | ( | void |  | ) | const

References _grk_image::x0, and _grk_image::x1.

## Member Data Documentation

## GrkObjectWrapperImpl< GrkImage >

friend grk::GrkImage::GrkObjectWrapperImpl< GrkImage >

private

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

- GrkImage.h
- GrkImage.cpp
- GrkImage_Conversion.cpp