fix for writing 16-bit jpeg2000
authorSuleyman TURKMEN <sturkmen@hotmail.com>
Sat, 16 Apr 2016 21:37:28 +0000 (00:37 +0300)
committerSuleyman TURKMEN <sturkmen@hotmail.com>
Sat, 16 Apr 2016 21:37:28 +0000 (00:37 +0300)
modules/imgcodecs/src/grfmt_jpeg2000.cpp

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