fix RGBA_ONLY with generic mono
1. Convert MULTIBAND uint/short/etc. as we convert uint8 images. They are probably just uint8 that have been cast up in format. 2. Don't check that the image interpretation is a supported colourspace before calling vips_colourspace() ... we want to fail with an error if it can't be converted, not silently accept the image.
This commit is contained in:
parent
55cbde674b
commit
8a049e9dfc
@ -1464,7 +1464,6 @@ vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready,
|
||||
*/
|
||||
if( !coding[VIPS_CODING_RAD] &&
|
||||
in->Bands < 3 &&
|
||||
vips_colourspace_issupported( in ) &&
|
||||
saveable == VIPS_SAVEABLE_RGBA_ONLY ) {
|
||||
VipsImage *out;
|
||||
VipsInterpretation interpretation;
|
||||
|
@ -590,6 +590,9 @@ vips_image_default_interpretation( const VipsImage *image )
|
||||
|
||||
switch( image->BandFmt ) {
|
||||
case VIPS_FORMAT_UCHAR:
|
||||
case VIPS_FORMAT_SHORT:
|
||||
case VIPS_FORMAT_UINT:
|
||||
case VIPS_FORMAT_INT:
|
||||
switch( image->Bands ) {
|
||||
case 1:
|
||||
case 2:
|
||||
@ -626,11 +629,6 @@ vips_image_default_interpretation( const VipsImage *image )
|
||||
return( VIPS_INTERPRETATION_MULTIBAND );
|
||||
}
|
||||
|
||||
case VIPS_FORMAT_SHORT:
|
||||
case VIPS_FORMAT_UINT:
|
||||
case VIPS_FORMAT_INT:
|
||||
return( VIPS_INTERPRETATION_MULTIBAND );
|
||||
|
||||
case VIPS_FORMAT_FLOAT:
|
||||
case VIPS_FORMAT_DOUBLE:
|
||||
switch( image->Bands ) {
|
||||
|
Loading…
Reference in New Issue
Block a user