jpeg cmyk write was not inverting

the change to vips_sink_disc() for vips2jpeg make CMYK write fail, argh

thanks to Ole for the report
This commit is contained in:
John Cupitt 2011-07-08 11:34:26 +01:00
parent b04daa4849
commit 6131388cc4
3 changed files with 18 additions and 9 deletions

View File

@ -68,6 +68,7 @@
- added VipsPool, got rid of floating refs again, argh
- VIPS_EXEEXT is now part of the exported API
- im_blend() also does sizealike, oops
- jpeg write was not inverting CMYK, thanks Ole
30/11/10 started 7.24.0
- bump for new stable

7
TODO
View File

@ -1,3 +1,10 @@
- icc import / export should cast their inputs, they insist on uchar etc. at
the moment
- can we call vips7 funcs from the vips8 interface?
- revisit orc conv
use an 8.8 accumulator ... build the scale into the 8.8 coeffs ... no div at

View File

@ -38,6 +38,8 @@
* 18/7/10
* - collect im_vips2bufjpeg() output in a list of blocks ... we no
* longer overallocate or underallocate
* 8/7/11
* - oop CMYK write was not inverting, thanks Ole
*/
/*
@ -540,16 +542,16 @@ write_jpeg_block( REGION *region, Rect *area, void *a )
Write *write = (Write *) a;
int i;
/* We are running in a background thread. We need to catch longjmp()s
* here instead.
*/
if( setjmp( write->eman.jmp ) )
return( -1 );
for( i = 0; i < area->height; i++ )
write->row_pointer[i] = (JSAMPROW)
IM_REGION_ADDR( region, 0, area->top + i );
/* We are running in a background thread. We need to catch any
* longjmp()s from jpeg_write_scanlines() here.
*/
if( setjmp( write->eman.jmp ) )
return( -1 );
jpeg_write_scanlines( &write->cinfo, write->row_pointer, area->height );
return( 0 );
@ -609,8 +611,7 @@ write_vips( Write *write, int qfac, const char *profile )
/* Build VIPS output stuff now we know the image we'll be writing.
*/
if( !(write->row_pointer =
IM_ARRAY( NULL, write->in->Ysize, JSAMPROW )) )
if( !(write->row_pointer = IM_ARRAY( NULL, in->Ysize, JSAMPROW )) )
return( -1 );
/* Rest to default.
@ -641,7 +642,7 @@ write_vips( Write *write, int qfac, const char *profile )
/* Write data. Note that the write function grabs the longjmp()!
*/
if( vips_sink_disc( write->in, write_jpeg_block, write ) )
if( vips_sink_disc( in, write_jpeg_block, write ) )
return( -1 );
/* We have to reinstate the setjmp() before we jpeg_finish_compress().