fix greyscale magicksave write
credit kleisauke
This commit is contained in:
parent
43c3db76c2
commit
e830ca7776
@ -156,10 +156,6 @@ vips_foreign_save_magick_create_one( VipsForeignSaveMagick *magick,
|
|||||||
if( !magick_set_image_size( image, im->Xsize, im->Ysize,
|
if( !magick_set_image_size( image, im->Xsize, im->Ysize,
|
||||||
magick->exception ) )
|
magick->exception ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
if( im->Bands < 3 )
|
|
||||||
if( !magick_set_image_colorspace( image, GRAYColorspace,
|
|
||||||
magick->exception ) )
|
|
||||||
return( -1 );
|
|
||||||
vips_foreign_save_magick_set_properties( magick, image, im );
|
vips_foreign_save_magick_set_properties( magick, image, im );
|
||||||
|
|
||||||
magick->current_image = image;
|
magick->current_image = image;
|
||||||
@ -256,11 +252,11 @@ vips_foreign_save_magick_build( VipsObject *object )
|
|||||||
magick->map = NULL;
|
magick->map = NULL;
|
||||||
switch( im->Bands ) {
|
switch( im->Bands ) {
|
||||||
case 1:
|
case 1:
|
||||||
magick->map = g_strdup( "R" );
|
magick->map = g_strdup( "I" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
magick->map = g_strdup( "RA" );
|
magick->map = g_strdup( "IA" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user