| 73 | |
| 74 | |
| 75 | void 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 | |
| 99 | bool GenericImageDesc::isPackedFloatRGBA() const |
| 100 | { |
no test coverage detected