MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / init

Method init

src/OpenColorIO/ImageDesc.cpp:75–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75void GenericImageDesc::init(const ImageDesc & img, BitDepth bitDepth, const ConstOpCPURcPtr & bitDepthOp)
76{
77 m_bitDepthOp = bitDepthOp;
78
79 m_width = img.getWidth();
80 m_height = img.getHeight();
81
82 m_xStrideBytes = img.getXStrideBytes();
83 m_yStrideBytes = img.getYStrideBytes();
84
85 m_rData = reinterpret_cast<char *>(img.getRData());
86 m_gData = reinterpret_cast<char *>(img.getGData());
87 m_bData = reinterpret_cast<char *>(img.getBData());
88 m_aData = reinterpret_cast<char *>(img.getAData());
89
90 m_isRGBAPacked = img.isRGBAPacked();
91 m_isFloat = img.isFloat();
92
93 if(img.getBitDepth()!=bitDepth)
94 {
95 throw Exception("Bit-depth mismatch between the image buffer and the finalization setting.");
96 }
97}
98
99bool GenericImageDesc::isPackedFloatRGBA() const
100{

Callers 6

InitImageTextureFunction · 0.45
mainFunction · 0.45
applyMethod · 0.45
AFunction · 0.45
slick.min.jsFile · 0.45
shuffle.min.jsFile · 0.45

Calls 11

getWidthMethod · 0.45
getHeightMethod · 0.45
getXStrideBytesMethod · 0.45
getYStrideBytesMethod · 0.45
getRDataMethod · 0.45
getGDataMethod · 0.45
getBDataMethod · 0.45
getADataMethod · 0.45
isRGBAPackedMethod · 0.45
isFloatMethod · 0.45
getBitDepthMethod · 0.45

Tested by

no test coverage detected