some formal changes (generally adding constness)
This commit is contained in:
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user