improve labpack processing

This commit is contained in:
Angel Sánchez 2019-06-20 09:30:08 +02:00 committed by John Cupitt
parent ceb2db513d
commit 415af7a10c
1 changed files with 6 additions and 4 deletions

View File

@ -754,13 +754,15 @@ rtiff_labpack_line( Rtiff *rtiff, VipsPel *q, VipsPel *p, int n, void *dummy )
{
int samples_per_pixel = rtiff->header.samples_per_pixel;
float pf[3];
int x;
for( x = 0; x < n; x++ ) {
q[0] = p[0];
q[1] = p[1];
q[2] = p[2];
q[3] = 0;
pf[0] = p[0] * 100.0f / 255.0f;
pf[1] = (signed char)p[1];
pf[2] = (signed char)p[2];
vips__Lab2LabQ_vec(q, pf, 1);
q += 4;
p += samples_per_pixel;