fix for writing 16-bit jpeg2000

This commit is contained in:
Suleyman TURKMEN 2016-04-17 00:37:28 +03:00 committed by Alexander Alekhin
parent 3bd6912e01
commit 194f1beae8

View File

@ -502,7 +502,7 @@ bool Jpeg2KEncoder::writeComponent16u( void *__img, const Mat& _img )
for( int y = 0; y < h; y++ ) for( int y = 0; y < h; y++ )
{ {
uchar* data = _img.data + _img.step*y; const ushort* data = _img.ptr<ushort>(y);
for( int i = 0; i < ncmpts; i++ ) for( int i = 0; i < ncmpts; i++ )
{ {
for( int x = 0; x < w; x++) for( int x = 0; x < w; x++)