Handle error values when guessing interpretation (#2421)
This commit is contained in:
parent
4aaed60573
commit
bd8093ab71
@ -578,6 +578,10 @@ vips_image_guess_interpretation( const VipsImage *image )
|
||||
/* Coding overrides interpretation.
|
||||
*/
|
||||
switch( image->Coding ) {
|
||||
case VIPS_CODING_ERROR:
|
||||
sane = FALSE;
|
||||
break;
|
||||
|
||||
case VIPS_CODING_LABQ:
|
||||
if( image->Type != VIPS_INTERPRETATION_LABQ )
|
||||
sane = FALSE;
|
||||
@ -593,6 +597,10 @@ vips_image_guess_interpretation( const VipsImage *image )
|
||||
}
|
||||
|
||||
switch( image->Type ) {
|
||||
case VIPS_INTERPRETATION_ERROR:
|
||||
sane = FALSE;
|
||||
break;
|
||||
|
||||
case VIPS_INTERPRETATION_MULTIBAND:
|
||||
/* This is a pretty useless generic tag. Always reset it.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user