Merge branch 'master' of github.com:libvips/libvips
This commit is contained in:
commit
2f806320f3
|
@ -195,7 +195,7 @@ vips_sequential_build( VipsObject *object )
|
|||
if( vips_linecache( sequential->in, &t,
|
||||
"tile_height", sequential->tile_height,
|
||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||
/* We need seq caches to persist across minimise, in case
|
||||
/* We need seq caches to persist across minimise in case
|
||||
* someone is trying to read an image with a series of crop
|
||||
* operations.
|
||||
*/
|
||||
|
|
|
@ -2041,15 +2041,6 @@ rtiff_stripwise_generate( VipsRegion *or,
|
|||
rtiff->y_pos += hit.height;
|
||||
}
|
||||
|
||||
/* Shut down the input file as soon as we can.
|
||||
*/
|
||||
if( rtiff->y_pos >= or->im->Ysize ) {
|
||||
#ifdef DEBUG
|
||||
printf( "rtiff_stripwise_generate: early shutdown\n" );
|
||||
#endif /*DEBUG*/
|
||||
rtiff_free( rtiff );
|
||||
}
|
||||
|
||||
VIPS_GATE_STOP( "rtiff_stripwise_generate: work" );
|
||||
|
||||
return( 0 );
|
||||
|
|
|
@ -1235,23 +1235,24 @@ invert_band0( Wtiff *wtiff, VipsPel *q, VipsPel *p, int n )
|
|||
static void
|
||||
LabS2Lab16( VipsPel *q, VipsPel *p, int n, int samples_per_pixel )
|
||||
{
|
||||
int x;
|
||||
short *p1 = (short *) p;
|
||||
unsigned short *q1 = (unsigned short *) q;
|
||||
|
||||
int x;
|
||||
|
||||
for( x = 0; x < n; x++ ) {
|
||||
int i;
|
||||
|
||||
/* TIFF uses unsigned 16 bit ... move zero, scale up L.
|
||||
/* LABS L can be negative.
|
||||
*/
|
||||
q1[0] = VIPS_LSHIFT_INT( (int) p1[0], 1 );
|
||||
q1[0] = VIPS_LSHIFT_INT( VIPS_MAX( 0, p1[0] ), 1 );
|
||||
|
||||
for( i = 1; i < samples_per_pixel; i++ )
|
||||
q1[i] = p1[i];
|
||||
|
||||
q1 += samples_per_pixel;
|
||||
p1 += samples_per_pixel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Pack the pixels in @area from @in into a TIFF tile buffer.
|
||||
|
|
Loading…
Reference in New Issue