/** * @brief Get White Point information from raw exif data * This is internal function and is not exposed to client * @param [in] offset Offset to entry in bytes inside raw exif data * @return White Point value * * If the image uses CIE Standard Illumination D65(known as international * standard of 'daylight'), the values are '3127/10000,3290/10000'. */ std::vector<u_rational_t> ExifReader::getWhitePoint(const size_t offset) const { std::vector<u_rational_t> result; uint32_t rationalOffset = getU32( offset + 8 ); result.push_back( getURational( rationalOffset ) ); result.push_back( getURational( rationalOffset + 8 ) ); return result; }
/** * @brief Get YCbCr Coefficients information from raw exif data * This is internal function and is not exposed to client * @param [in] offset Offset to entry in bytes inside raw exif data * @return vector with YCbCr coefficients values * */ std::vector<u_rational_t> ExifReader::getYCbCrCoeffs(const size_t offset) const { std::vector<u_rational_t> result; uint32_t rationalOffset = getU32( offset + 8 ); for( size_t i = 0; i < ycbcrCoeffs; i++ ) { result.push_back( getURational( rationalOffset ) ); rationalOffset += 8; } return result; }
/** * @brief Get Primary Chromaticies information from raw exif data * This is internal function and is not exposed to client * @param [in] offset Offset to entry in bytes inside raw exif data * @return vector with primary chromaticies values * */ std::vector<u_rational_t> ExifReader::getPrimaryChromaticies(const size_t offset) const { std::vector<u_rational_t> result; uint32_t rationalOffset = getU32( offset + 8 ); for( size_t i = 0; i < primaryChromaticiesComponents; i++ ) { result.push_back( getURational( rationalOffset ) ); rationalOffset += 8; } return result; }
/** * @brief Get Reference Black&White point information from raw exif data * This is internal function and is not exposed to client * @param [in] offset Offset to entry in bytes inside raw exif data * @return vector with reference BW points * * In case of YCbCr format, first 2 show black/white of Y, next 2 are Cb, * last 2 are Cr. In case of RGB format, first 2 show black/white of R, * next 2 are G, last 2 are B. * */ std::vector<u_rational_t> ExifReader::getRefBW(const size_t offset) const { const size_t rationalFieldSize = 8; std::vector<u_rational_t> result; uint32_t rationalOffset = getU32( offset + rationalFieldSize ); for( size_t i = 0; i < refBWComponents; i++ ) { result.push_back( getURational( rationalOffset ) ); rationalOffset += rationalFieldSize; } return result; }
inline URational getValue(const byte* buf, ByteOrder byteOrder) { return getURational(buf, byteOrder); }