From 4b7bd0810b7a46e98b97333177826fabfe362a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Angel=20S=C3=A1nchez?= Date: Mon, 22 Jul 2019 09:56:53 +0200 Subject: [PATCH] Revert "correctly parse labQ with extra channels" This reverts commit a817b3874e695bacc2f38d351d93e917373631e5. --- libvips/foreign/tiff2vips.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libvips/foreign/tiff2vips.c b/libvips/foreign/tiff2vips.c index a54c28ce..760a5d11 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -756,7 +756,6 @@ rtiff_labpack_line( Rtiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy ) float pf[3]; int x; - int i; for( x = 0; x < n; x++ ) { pf[0] = p[0] * 100.0f / 255.0f; @@ -765,10 +764,7 @@ rtiff_labpack_line( Rtiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy ) vips__Lab2LabQ_vec(q, pf, 1); - for (i = 3; i < samples_per_pixel; i++) - q[i+1] = p[i]; - - q += samples_per_pixel+1; + q += 4; p += samples_per_pixel; } } @@ -783,7 +779,7 @@ rtiff_parse_labpack( Rtiff *rtiff, VipsImage *out ) rtiff_check_interpretation( rtiff, PHOTOMETRIC_CIELAB ) ) return( -1 ); - out->Bands = rtiff->header.samples_per_pixel + 1; + out->Bands = 4; out->BandFmt = VIPS_FORMAT_UCHAR; out->Coding = VIPS_CODING_LABQ; out->Type = VIPS_INTERPRETATION_LAB;