Merge branch '8.8'
This commit is contained in:
commit
80f247cfb2
@ -17,6 +17,8 @@ magic number [przemyslawpluta]
|
|||||||
- remove 256 band limit in arithmetic.c [erdmann]
|
- remove 256 band limit in arithmetic.c [erdmann]
|
||||||
- disable Orc if building with CET [lovell]
|
- disable Orc if building with CET [lovell]
|
||||||
- fix vipsthumbnail with pyr tiff [kleisauke]
|
- fix vipsthumbnail with pyr tiff [kleisauke]
|
||||||
|
- text autofit could occasionally terminate early [levmorozov]
|
||||||
|
- fewer warnings on tiffload [chregu]
|
||||||
|
|
||||||
21/9/18 started 8.8.0
|
21/9/18 started 8.8.0
|
||||||
- much faster smartcrop [lovell]
|
- much faster smartcrop [lovell]
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
* 16/3/19
|
* 16/3/19
|
||||||
* - add `justify`
|
* - add `justify`
|
||||||
* - set Xoffset/Yoffset to ink left/top
|
* - set Xoffset/Yoffset to ink left/top
|
||||||
|
* 27/6/19
|
||||||
|
* - fitting could occasionally terminate early [levmorozov]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -204,18 +206,13 @@ vips_text_get_extents( VipsText *text, VipsRect *extents )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return -ve for extents too small, 0 for a fit, +ve for extents too large.
|
/* Return -ve for extents too small, +ve for extents too large.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
vips_text_rect_difference( VipsRect *target, VipsRect *extents )
|
vips_text_rect_difference( VipsRect *target, VipsRect *extents )
|
||||||
{
|
{
|
||||||
if( vips_rect_includesrect( target, extents ) ) {
|
if( vips_rect_includesrect( target, extents ) )
|
||||||
if( target->width == extents->width ||
|
|
||||||
target->height == extents->height )
|
|
||||||
return( 0 );
|
|
||||||
|
|
||||||
return( -1 );
|
return( -1 );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return( 1 );
|
return( 1 );
|
||||||
}
|
}
|
||||||
@ -261,10 +258,9 @@ vips_text_autofit( VipsText *text )
|
|||||||
previous_difference = difference;
|
previous_difference = difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hit the size, or we straddle the target.
|
/* Stop if we straddle the target.
|
||||||
*/
|
*/
|
||||||
if( difference == 0 ||
|
if( difference != previous_difference )
|
||||||
difference != previous_difference )
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
previous_difference = difference;
|
previous_difference = difference;
|
||||||
|
@ -254,6 +254,7 @@ typedef struct _RtiffHeader {
|
|||||||
gboolean separate;
|
gboolean separate;
|
||||||
int orientation;
|
int orientation;
|
||||||
gboolean premultiplied;
|
gboolean premultiplied;
|
||||||
|
uint16 compression;
|
||||||
|
|
||||||
/* Result of TIFFIsTiled().
|
/* Result of TIFFIsTiled().
|
||||||
*/
|
*/
|
||||||
@ -1331,9 +1332,12 @@ rtiff_set_header( Rtiff *rtiff, VipsImage *out )
|
|||||||
uint32 data_length;
|
uint32 data_length;
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
/* Request YCbCr expansion.
|
/* Request YCbCr expansion. libtiff complains if you do this for
|
||||||
|
* non-jpg images.
|
||||||
*/
|
*/
|
||||||
TIFFSetField( rtiff->tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
|
if( rtiff->header.compression == COMPRESSION_JPEG )
|
||||||
|
TIFFSetField( rtiff->tiff,
|
||||||
|
TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );
|
||||||
|
|
||||||
out->Xsize = rtiff->header.width;
|
out->Xsize = rtiff->header.width;
|
||||||
out->Ysize = rtiff->header.height * rtiff->n;
|
out->Ysize = rtiff->header.height * rtiff->n;
|
||||||
@ -2074,7 +2078,6 @@ rtiff_header_read( Rtiff *rtiff, RtiffHeader *header )
|
|||||||
{
|
{
|
||||||
uint16 extra_samples_count;
|
uint16 extra_samples_count;
|
||||||
uint16 *extra_samples_types;
|
uint16 *extra_samples_types;
|
||||||
uint16 compression;
|
|
||||||
|
|
||||||
if( !tfget32( rtiff->tiff, TIFFTAG_IMAGEWIDTH, &header->width ) ||
|
if( !tfget32( rtiff->tiff, TIFFTAG_IMAGEWIDTH, &header->width ) ||
|
||||||
!tfget32( rtiff->tiff, TIFFTAG_IMAGELENGTH, &header->height ) ||
|
!tfget32( rtiff->tiff, TIFFTAG_IMAGELENGTH, &header->height ) ||
|
||||||
@ -2088,8 +2091,8 @@ rtiff_header_read( Rtiff *rtiff, RtiffHeader *header )
|
|||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
TIFFGetFieldDefaulted( rtiff->tiff,
|
TIFFGetFieldDefaulted( rtiff->tiff,
|
||||||
TIFFTAG_COMPRESSION, &compression );
|
TIFFTAG_COMPRESSION, &header->compression );
|
||||||
if( compression == COMPRESSION_JPEG )
|
if( header->compression == COMPRESSION_JPEG )
|
||||||
/* We want to always expand subsampled YCBCR images to full
|
/* We want to always expand subsampled YCBCR images to full
|
||||||
* RGB.
|
* RGB.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user