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