[opencv] 89/98: fix for writing 16-bit jpeg2000

Mattia Rizzolo mattia at debian.org
Tue Oct 4 17:51:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 2.4.13
in repository opencv.

commit 194f1beae8669eb60fd68a7eeaec6eda0411ce3b
Author: Suleyman TURKMEN <sturkmen at hotmail.com>
Date:   Sun Apr 17 00:37:28 2016 +0300

    fix for writing 16-bit jpeg2000
---
 modules/highgui/src/grfmt_jpeg2000.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/highgui/src/grfmt_jpeg2000.cpp b/modules/highgui/src/grfmt_jpeg2000.cpp
index 28818e3..da5d718 100644
--- a/modules/highgui/src/grfmt_jpeg2000.cpp
+++ b/modules/highgui/src/grfmt_jpeg2000.cpp
@@ -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 ushort* data = _img.ptr<ushort>(y);
         for( int i = 0; i < ncmpts; i++ )
         {
             for( int x = 0; x < w; x++)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list