From 56d98f3ef06aa20b94d6b23e15365595fcabee57 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 23 Apr 2019 11:35:13 +0100 Subject: [PATCH] thumbnail no longer needs to import cmyk since colourspace knows about cmyk now --- libvips/iofuncs/init.c | 3 ++- libvips/resample/thumbnail.c | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index bcd1daab..eb8bbda9 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -291,13 +291,14 @@ set_stacksize( guint64 size ) return; } - if( cur_stack_size < size ) + if( cur_stack_size < size ) { if( pthread_attr_setstacksize( &attr, size ) || pthread_setattr_default_np( &attr ) ) g_warning( "set_stacksize: unable to set stack size" ); else g_info( "set stack size to %" G_GUINT64_FORMAT "k", size / (guint64) 1024 ); + } #endif /*HAVE_PTHREAD_DEFAULT_NP*/ } diff --git a/libvips/resample/thumbnail.c b/libvips/resample/thumbnail.c index 84a58320..8d386e78 100644 --- a/libvips/resample/thumbnail.c +++ b/libvips/resample/thumbnail.c @@ -18,6 +18,8 @@ * - implement shrink-on-load for tiff pyramid * 3/2/19 kleisauke * - add option_string param to thumbnail_buffer + * 23/4/19 + * - don't force import CMYK, since colourspace knows about it now */ /* @@ -567,17 +569,13 @@ vips_thumbnail_build( VipsObject *object ) } /* In linear mode, we import right at the start. - * - * We also have to import the whole image if it's CMYK, since - * vips_colourspace() (see below) doesn't know about CMYK. * * This is only going to work for images in device space. If you have * an image in PCS which also has an attached profile, strange things * will happen. */ have_imported = FALSE; - if( (thumbnail->linear || - in->Type == VIPS_INTERPRETATION_CMYK) && + if( thumbnail->linear && in->Coding == VIPS_CODING_NONE && (in->BandFmt == VIPS_FORMAT_UCHAR || in->BandFmt == VIPS_FORMAT_USHORT) &&