From 4dae352d28009c4d4e78f790d625b82f6d23efd1 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 23 Jan 2014 15:36:34 +0000 Subject: [PATCH] better autounpack for falsecolour --- libvips/conversion/falsecolour.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libvips/conversion/falsecolour.c b/libvips/conversion/falsecolour.c index 8049e04c..867e6fe2 100644 --- a/libvips/conversion/falsecolour.c +++ b/libvips/conversion/falsecolour.c @@ -54,6 +54,7 @@ #include #include +#include #include "pconversion.h" @@ -348,11 +349,11 @@ vips_falsecolour_build( VipsObject *object ) * want to work for images which aren't in a recognised space, like * MULTIBAND. */ - if( vips_check_uncoded( class->nickname, falsecolour->in ) || - vips_extract_band( falsecolour->in, &t[1], 0, NULL ) || - vips_cast( t[1], &t[2], VIPS_FORMAT_UCHAR, NULL ) || - vips_maplut( t[2], &t[3], t[0], NULL ) || - vips_image_write( t[3], conversion->out ) ) + if( vips__image_decode( falsecolour->in, &t[1] ) || + vips_extract_band( t[1], &t[2], 0, NULL ) || + vips_cast( t[2], &t[3], VIPS_FORMAT_UCHAR, NULL ) || + vips_maplut( t[3], &t[4], t[0], NULL ) || + vips_image_write( t[4], conversion->out ) ) return( -1 ); return( 0 );