Merge branch '7.40'

This commit is contained in:
John Cupitt 2014-09-11 19:29:09 +01:00
commit 62a98dbdf7
3 changed files with 37 additions and 2 deletions

View File

@ -8,6 +8,8 @@
8/9/14 started 7.40.9
- support jfif resunit "none"
- support GRAY as an input and output ICC space
- fix a read loop with setjmp() in png read, if the png file is broken
8/9/14 started 7.40.8
- fix configure on rhel6 [Lovell]

View File

@ -26,6 +26,8 @@
* - import and export would segv on very wide images
* 12/11/13
* - support XYZ as an alternative PCS
* 10/9/14
* - support GRAY as an input and output space
*/
/*
@ -245,6 +247,18 @@ vips_icc_build( VipsObject *object )
TYPE_RGB_16 : TYPE_RGB_8;
break;
#ifdef HAVE_LCMS2
case cmsSigGrayData:
code->input_bands = 1;
code->input_format =
code->in->BandFmt == VIPS_FORMAT_USHORT ?
VIPS_FORMAT_USHORT : VIPS_FORMAT_UCHAR;
icc->in_icc_format =
code->in->BandFmt == VIPS_FORMAT_USHORT ?
TYPE_GRAY_16 : TYPE_GRAY_8;
break;
#endif /*HAVE_LCMS2*/
case cmsSigCmykData:
code->input_bands = 4;
code->input_format =
@ -266,8 +280,6 @@ vips_icc_build( VipsObject *object )
case cmsSigXYZData:
code->input_bands = 3;
code->input_format = VIPS_FORMAT_FLOAT;
code->input_interpretation =
VIPS_INTERPRETATION_XYZ;
icc->in_icc_format = TYPE_XYZ_16;
break;
@ -295,6 +307,22 @@ vips_icc_build( VipsObject *object )
TYPE_RGB_16 : TYPE_RGB_8;
break;
#ifdef HAVE_LCMS2
case cmsSigGrayData:
colour->interpretation =
icc->depth == 8 ?
VIPS_INTERPRETATION_B_W :
VIPS_INTERPRETATION_GREY16;
colour->format =
icc->depth == 8 ?
VIPS_FORMAT_UCHAR : VIPS_FORMAT_USHORT;
colour->bands = 1;
icc->out_icc_format =
icc->depth == 16 ?
TYPE_GRAY_16 : TYPE_GRAY_8;
break;
#endif /*HAVE_LCMS2*/
case cmsSigCmykData:
colour->interpretation = VIPS_INTERPRETATION_CMYK;
colour->format =

View File

@ -509,6 +509,11 @@ png2vips_generate( VipsRegion *or,
read->y_pos += 1;
}
/* Turn errors back on. png_read_end() can trigger them too.
*/
if( setjmp( png_jmpbuf( read->pPng ) ) )
return( -1 );
/* We need to shut down the reader immediately at the end of read or
* we won't detach ready for the next image.
*/