X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=modules%2Fimgcodecs%2Fsrc%2Fgrfmt_jpeg2000.cpp;h=83fd55a59405af0507f46aeeb1043674d0acf1c5;hb=98d5731ad8342ec2ea3cc83ad81c1399d4a7a638;hp=d711846ce8ee9e046123de9d7b3ddb32155eb696;hpb=00263dd664b7889c057ba7d03d4d43308e345105;p=profile%2Fivi%2Fopencv.git diff --git a/modules/imgcodecs/src/grfmt_jpeg2000.cpp b/modules/imgcodecs/src/grfmt_jpeg2000.cpp index d711846..83fd55a 100644 --- a/modules/imgcodecs/src/grfmt_jpeg2000.cpp +++ b/modules/imgcodecs/src/grfmt_jpeg2000.cpp @@ -154,7 +154,7 @@ bool Jpeg2KDecoder::readData( Mat& img ) { bool result = false; int color = img.channels() > 1; - uchar* data = img.data; + uchar* data = img.ptr(); int step = (int)img.step; jas_stream_t* stream = (jas_stream_t*)m_stream; jas_image_t* image = (jas_image_t*)m_image; @@ -478,7 +478,7 @@ bool Jpeg2KEncoder::writeComponent8u( void *__img, const Mat& _img ) for( int y = 0; y < h; y++ ) { - uchar* data = _img.data + _img.step*y; + const uchar* data = _img.ptr(y); for( int i = 0; i < ncmpts; i++ ) { for( int x = 0; x < w; x++) @@ -502,7 +502,7 @@ bool Jpeg2KEncoder::writeComponent16u( void *__img, const Mat& _img ) for( int y = 0; y < h; y++ ) { - uchar* data = _img.data + _img.step*y; + const uchar* data = _img.ptr(y); for( int i = 0; i < ncmpts; i++ ) { for( int x = 0; x < w; x++)