Jpeg2k color to greyscale conversion on non-Windows is done post decoding because system libjasper segfaults when decoding color images as greyscale.

This commit is contained in:
Ashod Nakashian
2015-04-03 20:59:13 -04:00
parent 54ab3137d5
commit f75f2ffd48
3 changed files with 39 additions and 17 deletions
+1 -8
View File
@@ -374,15 +374,8 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
type = CV_MAKETYPE(CV_MAT_DEPTH(type), 1);
}
// established the required input image size.
CvSize size;
size.width = decoder->width();
size.height = decoder->height();
Mat mat;
mat.create(size.height, size.width, type);
// read the image data
Mat mat(decoder->height(), decoder->width(), type);
if (!decoder->readData(mat))
{
break;