bool readPixel(PixelType& _pixel) { _UByteCV* ptr; if (!ImageRowAccessor::accessPixel(ptr, 4)) return false; return _pixel.unpack(ptr[0], ptr[1], ptr[2], ptr[3]); }
bool readPixel(PixelType& _pixel) { _UByteCV* ptr; if (m_readParity) { if (!ImageRowAccessor::accessPixel(ptr, 4, 2)) // 4 bytes, 2 pixels return false; m_readParity = false; return _pixel.unpack(ptr[2], ptr[1], ptr[3]); } else { if (!ImageRowAccessor::accessPixelDontMove(ptr, 4, 2)) // 4 bytes, 2 pixels return false; m_readParity = true; return _pixel.unpack(ptr[0], ptr[1], ptr[3]); } }