Grok 12.0.1
|
#include <GrkImage.h>
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) |
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 | |
![]() | |
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 |
grk::GrkImage::GrkImage | ( | ) |
References grk::grk_read(), _grk_image::obj, _grk_image::rowsPerTask, grk::singleTileRowsPerStrip, and _grk_object::wrapper.
Referenced by create(), and duplicate().
|
private |
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().
return false if :
References _grk_image::comps, grk::Logger::error(), GRK_MAX_SUPPORTED_IMAGE_PRECISION, grk::grk_read(), grk::Logger::logger_, _grk_image::numcomps, and grk::Logger::warn().
Referenced by applyICC(), cieLabToRGB(), color_cmyk_to_rgb(), and color_esycc_to_rgb().
Allocate data for tile compositing.
References allocData(), _grk_image::comps, grk::Logger::error(), grk::grk_read(), _grk_image::hasMultipleTiles, grk::Logger::logger_, and _grk_image::numcomps.
Referenced by grk::CodeStreamDecompress::createOutputImage().
|
static |
References allocData(), and grk::grk_read().
|
static |
Allocate data for single image component.
imageComp | image component |
References grk::Logger::error(), grk::grk_aligned_malloc(), grk::grk_make_aligned_width(), grk::grk_read(), grk::Logger::logger_, and single_component_data_free().
Referenced by allocCompositeData(), allocData(), apply_palette_clr(), applyICC(), create(), execUpsample(), and greyToRGB().
References _grk_image::meta.
Referenced by grk::FileFormatDecompress::read_palette_clr().
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::Logger::logger_, _grk_image::meta, _grk_channel_definition::num_channel_descriptions, _grk_image::numcomps, _grk_image_comp::type, and grk::Logger::warn().
Referenced by applyColour().
References allocData(), _grk_palette_data::channel_prec, _grk_image_meta::color, _grk_image::comps, grk::Logger::error(), grk::grk_aligned_free(), grk::grk_read(), grk::Logger::logger_, _grk_image::meta, _grk_image::numcomps, _grk_color::palette, _grk_image::paletteApplied_, and single_component_data_free().
Referenced by applyColour().
Convert to sRGB.
References applyICC(), cieLabToRGB(), _grk_image_meta::color, _grk_image::color_space, _grk_image::decompressFormat, grk::Logger::error(), _grk_image::forceRGB, GRK_CLRSPC_CUSTOM_CIE, GRK_CLRSPC_DEFAULT_CIE, GRK_FMT_BMP, GRK_FMT_JPG, GRK_FMT_PNG, GRK_FMT_TIF, GRK_FMT_UNK, grk::grk_read(), _grk_color::icc_profile_buf, grk::Logger::logger_, _grk_image::meta, validateICC(), and grk::Logger::warn().
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_image_comp::h, _grk_color::icc_profile_buf, _grk_color::icc_profile_len, grk::Logger::logger_, _grk_image::meta, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::stride, validateICC(), _grk_image_comp::w, and grk::Logger::warn().
Referenced by applyColourManagement(), and grk::CodeStreamCompress::init().
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_image_comp::h, _grk_color::icc_profile_buf, grk::Logger::logger_, _grk_image::meta, _grk_image::numcomps, _grk_image_comp::prec, single_component_data_free(), _grk_image_comp::stride, _grk_image_comp::w, and grk::Logger::warn().
Referenced by applyColourManagement().
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().
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().
References _grk_image::color_space, _grk_image::comps, GRK_CLRSPC_SRGB, grk::grk_read(), grk::Logger::logger_, _grk_image::numcomps, sycc420_to_rgb(), sycc422_to_rgb(), sycc444_to_rgb(), and grk::Logger::warn().
Referenced by convertToRGB().
References componentsEqual(), grk::grk_read(), and _grk_image::numcomps.
Referenced by componentsEqual(), componentsEqual(), grk::TileProcessor::needsMctDecompress(), and supportsStripCache().
|
private |
References grk::grk_read().
References componentsEqual(), _grk_image::comps, and grk::grk_read().
References compositeInterleaved(), compositePlanar(), _grk_io_buf::data_, grk::grk_read(), and _grk_image::interleavedData.
Referenced by grk::CodeStreamDecompress::decompressTiles().
Interleave image data and copy to interleaved composite image.
src | source image |
References _grk_image::comps, _grk_io_buf::data_, _grk_image::decompressFormat, generateCompositeBounds(), GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), _grk_image::interleavedData, grk::Logger::logger_, and grk::Logger::warn().
Referenced by composite().
Interleave strip of tile data and copy to interleaved composite image.
srcImg | source image |
References _grk_image::comps, _grk_io_buf::data_, _grk_image::decompressFormat, generateCompositeBounds(), GRK_FMT_PXM, GRK_FMT_TIF, grk::grk_read(), _grk_image::interleavedData, grk::Logger::logger_, and grk::Logger::warn().
Copy planar image data to planar composite image.
src | source image |
References _grk_image::comps, generateCompositeBounds(), grk::grk_read(), grk::Logger::logger_, and grk::Logger::warn().
Referenced by composite().
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::Logger::logger_, _grk_image::numcomps, _grk_image::numPrecision, _grk_precision::prec, _grk_image_comp::prec, _grk_image::precision, scaleComponent(), and grk::Logger::warn().
References color_cmyk_to_rgb(), color_esycc_to_rgb(), _grk_image::color_space, color_sycc_to_rgb(), grk::Logger::error(), GRK_CLRSPC_CMYK, GRK_CLRSPC_EYCC, GRK_CLRSPC_SYCC, grk::grk_read(), grk::Logger::logger_, needsConversionToRGB(), _grk_image::numcomps, grk::Logger::warn(), _grk_image::x0, and _grk_image::y0.
|
staticprivate |
References grk::grk_read().
Referenced by execUpsample(), and greyToRGB().
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.
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().
|
static |
Create image.
numcmpts | number of components |
cmptparms | component parameters |
clrspc | image color space |
doAllocation | true if data is to be allocated, otherwise false |
References allocData(), grk::Logger::error(), 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_read(), GrkImage(), and grk::Logger::logger_.
Referenced by createRGB(), and grk_image_new().
|
private |
References create(), GRK_CLRSPC_SRGB, grk::grk_read(), grk::Logger::logger_, and grk::Logger::warn().
Referenced by cieLabToRGB(), sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().
Create new image and transfer tile buffer data.
src | tile source |
References copyHeader(), grk::grk_read(), and GrkImage().
Referenced by grk::TileProcessor::generateImage().
|
private |
References generateCompositeBounds(), and grk::grk_read().
Referenced by compositeInterleaved(), compositeInterleaved(), compositePlanar(), and generateCompositeBounds().
|
private |
References _grk_image::comps, and grk::grk_read().
|
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().
|
private |
References _grk_image::color_space, and grk::grk_read().
Referenced by validateICC().
References _grk_image::y0, and _grk_image::y1.
Referenced by grk::CodeStreamDecompress::decompressTile(), grk::CodeStreamDecompress::decompressTiles(), and postReadHeader().
References _grk_image::comps, GRK_CHANNEL_TYPE_OPACITY, GRK_CHANNEL_TYPE_PREMULTIPLIED_OPACITY, grk::grk_read(), and _grk_image::numcomps.
Referenced by postReadHeader().
bool grk::GrkImage::isSubsampled | ( | ) |
References _grk_image::comps, grk::grk_read(), and _grk_image::numcomps.
Referenced by postReadHeader(), supportsStripCache(), and validateICC().
References grk::grk_read().
Referenced by validateICC().
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().
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.
|
private |
References grk::grk_read(), _grk_precision::prec, and _grk_image::precision.
Referenced by convertPrecision().
|
staticprivate |
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().
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().
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_image_comp::h, grk::Logger::logger_, _grk_image_comp::prec, _grk_image_comp::stride, sycc_to_rgb(), _grk_image_comp::w, and grk::Logger::warn().
Referenced by color_sycc_to_rgb().
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_image_comp::h, grk::Logger::logger_, _grk_image::numcomps, _grk_image_comp::prec, _grk_image_comp::stride, sycc_to_rgb(), _grk_image_comp::w, and grk::Logger::warn().
Referenced by color_sycc_to_rgb().
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().
|
private |
References grk::grk_read().
Referenced by sycc420_to_rgb(), sycc422_to_rgb(), and sycc444_to_rgb().
References _grk_image::comps, grk::grk_read(), _grk_image::numcomps, and single_component_data_free().
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().
References _grk_image::color_space, _grk_image::comps, GRK_CLRSPC_SYCC, GRK_CLRSPC_UNKNOWN, and _grk_image::numcomps.
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_color::icc_profile_buf, _grk_color::icc_profile_len, isSubsampled(), isValidICCColourSpace(), grk::Logger::logger_, _grk_image::meta, _grk_image::numcomps, and grk::Logger::warn().
Referenced by applyColourManagement(), applyICC(), and grk::FileFormatCompress::init().
References _grk_image::comps, grk::grk_read(), and _grk_image::numcomps.
References _grk_image::x0, and _grk_image::x1.