Merge pull request #2914 from alalek:fix2.4

pull/2901/head^2
Vadim Pisarevsky 11 years ago
commit d826bcdbbb
  1. 2
      modules/highgui/src/loadsave.cpp
  2. 2
      modules/python/test/test.py

@ -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++ )

@ -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)

Loading…
Cancel
Save