diff --git a/modules/highgui/src/loadsave.cpp b/modules/highgui/src/loadsave.cpp index 6658b1335e..81c708acdd 100644 --- a/modules/highgui/src/loadsave.cpp +++ b/modules/highgui/src/loadsave.cpp @@ -137,9 +137,9 @@ static ImageDecoder findDecoder( const Mat& buf ) maxlen = std::max(maxlen, len); } + string signature(maxlen, ' '); size_t bufSize = buf.rows*buf.cols*buf.elemSize(); maxlen = std::min(maxlen, bufSize); - string signature(maxlen, ' '); memcpy( &signature[0], buf.data, maxlen ); for( i = 0; i < codecs.decoders.size(); i++ ) diff --git a/modules/python/test/test.py b/modules/python/test/test.py index 10f32260b4..212fdbcd99 100755 --- a/modules/python/test/test.py +++ b/modules/python/test/test.py @@ -73,7 +73,7 @@ class OpenCVTests(unittest.TestCase): def get_sample(self, filename, iscolor = cv.CV_LOAD_IMAGE_COLOR): if not filename in self.image_cache: - filedata = urllib.urlopen("https://raw.github.com/Itseez/opencv/master/" + filename).read() + filedata = urllib.urlopen("https://raw.github.com/Itseez/opencv/2.4/" + filename).read() imagefiledata = cv.CreateMatHeader(1, len(filedata), cv.CV_8UC1) cv.SetData(imagefiledata, filedata, len(filedata)) self.image_cache[filename] = cv.DecodeImageM(imagefiledata, iscolor)