From e830ca7776d9154aeb8c94e9e273843915fe7923 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 23 Dec 2017 14:16:29 +0000 Subject: [PATCH] fix greyscale magicksave write credit kleisauke --- libvips/foreign/magicksave.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libvips/foreign/magicksave.c b/libvips/foreign/magicksave.c index 40eab5e4..2bd58763 100644 --- a/libvips/foreign/magicksave.c +++ b/libvips/foreign/magicksave.c @@ -156,10 +156,6 @@ vips_foreign_save_magick_create_one( VipsForeignSaveMagick *magick, if( !magick_set_image_size( image, im->Xsize, im->Ysize, magick->exception ) ) 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 ); magick->current_image = image; @@ -256,11 +252,11 @@ vips_foreign_save_magick_build( VipsObject *object ) magick->map = NULL; switch( im->Bands ) { case 1: - magick->map = g_strdup( "R" ); + magick->map = g_strdup( "I" ); break; case 2: - magick->map = g_strdup( "RA" ); + magick->map = g_strdup( "IA" ); break; case 3: