Revert "correctly parse labQ with extra channels"

This reverts commit a817b3874e695bacc2f38d351d93e917373631e5.
This commit is contained in:
Angel Sánchez 2019-07-22 09:56:53 +02:00 committed by John Cupitt
parent 64f1b60b14
commit 4b7bd0810b

View File

@ -756,7 +756,6 @@ rtiff_labpack_line( Rtiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy )
float pf[3]; float pf[3];
int x; int x;
int i;
for( x = 0; x < n; x++ ) { for( x = 0; x < n; x++ ) {
pf[0] = p[0] * 100.0f / 255.0f; 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); vips__Lab2LabQ_vec(q, pf, 1);
for (i = 3; i < samples_per_pixel; i++) q += 4;
q[i+1] = p[i];
q += samples_per_pixel+1;
p += samples_per_pixel; p += samples_per_pixel;
} }
} }
@ -783,7 +779,7 @@ rtiff_parse_labpack( Rtiff *rtiff, VipsImage *out )
rtiff_check_interpretation( rtiff, PHOTOMETRIC_CIELAB ) ) rtiff_check_interpretation( rtiff, PHOTOMETRIC_CIELAB ) )
return( -1 ); return( -1 );
out->Bands = rtiff->header.samples_per_pixel + 1; out->Bands = 4;
out->BandFmt = VIPS_FORMAT_UCHAR; out->BandFmt = VIPS_FORMAT_UCHAR;
out->Coding = VIPS_CODING_LABQ; out->Coding = VIPS_CODING_LABQ;
out->Type = VIPS_INTERPRETATION_LAB; out->Type = VIPS_INTERPRETATION_LAB;