ImageDecoder decoder;
#ifdef HAVE_GDAL
- if( (flags & IMREAD_LOAD_GDAL) == IMREAD_LOAD_GDAL ){
+ if(flags != IMREAD_UNCHANGED && (flags & IMREAD_LOAD_GDAL) == IMREAD_LOAD_GDAL ){
decoder = GdalDecoder().newDecoder();
}else{
#endif
// grab the decoded type
int type = decoder->type();
- if( flags != -1 )
+ if( flags != IMREAD_UNCHANGED )
{
if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
ImageDecoder decoder;
#ifdef HAVE_GDAL
- if ((flags & IMREAD_LOAD_GDAL) == IMREAD_LOAD_GDAL){
+ if (flags != IMREAD_UNCHANGED && (flags & IMREAD_LOAD_GDAL) == IMREAD_LOAD_GDAL){
decoder = GdalDecoder().newDecoder();
}
else{
{
// grab the decoded type
int type = decoder->type();
- if (flags != -1)
+ if (flags != IMREAD_UNCHANGED)
{
if ((flags & CV_LOAD_IMAGE_ANYDEPTH) == 0)
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
size.height = decoder->height();
int type = decoder->type();
- if( flags != -1 )
+ if( flags != IMREAD_UNCHANGED )
{
if( (flags & CV_LOAD_IMAGE_ANYDEPTH) == 0 )
type = CV_MAKETYPE(CV_8U, CV_MAT_CN(type));
ASSERT_TRUE(imread_compare(folder + string(filenames[i]), IMREAD_COLOR));
ASSERT_TRUE(imread_compare(folder + string(filenames[i]), IMREAD_ANYDEPTH));
ASSERT_TRUE(imread_compare(folder + string(filenames[i]), IMREAD_ANYCOLOR));
- ASSERT_TRUE(imread_compare(folder + string(filenames[i]), IMREAD_LOAD_GDAL));
+ if (i != 2) // GDAL does not support hdr
+ ASSERT_TRUE(imread_compare(folder + string(filenames[i]), IMREAD_LOAD_GDAL));
}
}
compare(IMREAD_COLOR);
compare(IMREAD_ANYDEPTH);
compare(IMREAD_ANYCOLOR);
- compare(IMREAD_LOAD_GDAL);
+ // compare(IMREAD_LOAD_GDAL); // GDAL does not support multi-page TIFFs
}
};