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