Merge branch '8.10'
This commit is contained in:
commit
f8faa5f7f7
@ -4,6 +4,9 @@
|
|||||||
9/8/20 started 8.10.1
|
9/8/20 started 8.10.1
|
||||||
- fix markdown -> xml conversion in doc generation
|
- fix markdown -> xml conversion in doc generation
|
||||||
- remove typedef redefinitions to please old gccs
|
- remove typedef redefinitions to please old gccs
|
||||||
|
- fix regression in tiff pyramid thumbnailing [tand826]
|
||||||
|
- stop 0-length buffer being passed to imagemagick [lovell]
|
||||||
|
- convert no-profile CMYK to RGB on save [augustocdias]
|
||||||
|
|
||||||
24/1/20 started 8.10.0
|
24/1/20 started 8.10.0
|
||||||
- more conformat IIIF output from dzsave [regisrob]
|
- more conformat IIIF output from dzsave [regisrob]
|
||||||
|
@ -1336,8 +1336,7 @@ vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If this image is CMYK and the saver is RGB-only, use lcms to try to
|
/* If this image is CMYK and the saver is RGB-only, use lcms to try to
|
||||||
* import to XYZ. This will only work if the image has an embedded
|
* import to XYZ.
|
||||||
* profile.
|
|
||||||
*/
|
*/
|
||||||
if( in->Type == VIPS_INTERPRETATION_CMYK &&
|
if( in->Type == VIPS_INTERPRETATION_CMYK &&
|
||||||
in->Bands >= 4 &&
|
in->Bands >= 4 &&
|
||||||
@ -1348,6 +1347,8 @@ vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready,
|
|||||||
|
|
||||||
if( vips_icc_import( in, &out,
|
if( vips_icc_import( in, &out,
|
||||||
"pcs", VIPS_PCS_XYZ,
|
"pcs", VIPS_PCS_XYZ,
|
||||||
|
"embedded", TRUE,
|
||||||
|
"input_profile", "cmyk",
|
||||||
NULL ) ) {
|
NULL ) ) {
|
||||||
g_object_unref( in );
|
g_object_unref( in );
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
@ -135,10 +135,14 @@ typedef struct _VipsThumbnail {
|
|||||||
int heif_thumbnail_width;
|
int heif_thumbnail_width;
|
||||||
int heif_thumbnail_height;
|
int heif_thumbnail_height;
|
||||||
|
|
||||||
/* For TIFF sources, open subifds rather than pages to get pyr layers.
|
/* For TIFF sources, open subifds to get pyr layers.
|
||||||
*/
|
*/
|
||||||
gboolean subifd_pyramid;
|
gboolean subifd_pyramid;
|
||||||
|
|
||||||
|
/* For TIFF sources, open pages to get pyr layers.
|
||||||
|
*/
|
||||||
|
gboolean page_pyramid;
|
||||||
|
|
||||||
} VipsThumbnail;
|
} VipsThumbnail;
|
||||||
|
|
||||||
typedef struct _VipsThumbnailClass {
|
typedef struct _VipsThumbnailClass {
|
||||||
@ -261,13 +265,10 @@ vips_thumbnail_get_tiff_pyramid_page( VipsThumbnail *thumbnail )
|
|||||||
|
|
||||||
/* Single-page docs can't be pyramids.
|
/* Single-page docs can't be pyramids.
|
||||||
*/
|
*/
|
||||||
if( thumbnail->n_loaded_pages < 2 )
|
if( thumbnail->n_pages < 2 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Use n_loaded_pages not n_pages since we support thumbnailing a page
|
for( i = 0; i < thumbnail->n_pages; i++ ) {
|
||||||
* or range of pages from a many-page tiff.
|
|
||||||
*/
|
|
||||||
for( i = 0; i < thumbnail->n_loaded_pages; i++ ) {
|
|
||||||
VipsImage *page;
|
VipsImage *page;
|
||||||
int level_width;
|
int level_width;
|
||||||
int level_height;
|
int level_height;
|
||||||
@ -301,9 +302,9 @@ vips_thumbnail_get_tiff_pyramid_page( VipsThumbnail *thumbnail )
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf( "vips_thumbnail_get_tiff_pyramid_page: "
|
printf( "vips_thumbnail_get_tiff_pyramid_page: "
|
||||||
"%d layer pyramid detected\n",
|
"%d layer pyramid detected\n",
|
||||||
thumbnail->n_loaded_pages );
|
thumbnail->n_pages );
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
thumbnail->level_count = thumbnail->n_loaded_pages;
|
thumbnail->level_count = thumbnail->n_pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Detect a TIFF pyramid made of subifds following a roughly /2 shrink.
|
/* Detect a TIFF pyramid made of subifds following a roughly /2 shrink.
|
||||||
@ -549,7 +550,12 @@ vips_thumbnail_open( VipsThumbnail *thumbnail )
|
|||||||
|
|
||||||
if( thumbnail->level_count == 0 ) {
|
if( thumbnail->level_count == 0 ) {
|
||||||
thumbnail->subifd_pyramid = FALSE;
|
thumbnail->subifd_pyramid = FALSE;
|
||||||
|
thumbnail->page_pyramid = TRUE;
|
||||||
|
|
||||||
vips_thumbnail_get_tiff_pyramid_page( thumbnail );
|
vips_thumbnail_get_tiff_pyramid_page( thumbnail );
|
||||||
|
|
||||||
|
if( thumbnail->level_count == 0 )
|
||||||
|
thumbnail->page_pyramid = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1060,7 +1066,7 @@ vips_thumbnail_file_open( VipsThumbnail *thumbnail, double factor )
|
|||||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||||
"subifd", (int) factor,
|
"subifd", (int) factor,
|
||||||
NULL ) );
|
NULL ) );
|
||||||
else if( thumbnail->level_count > 0 )
|
else if( thumbnail->page_pyramid )
|
||||||
return( vips_image_new_from_file( file->filename,
|
return( vips_image_new_from_file( file->filename,
|
||||||
"access", VIPS_ACCESS_SEQUENTIAL,
|
"access", VIPS_ACCESS_SEQUENTIAL,
|
||||||
"page", (int) factor,
|
"page", (int) factor,
|
||||||
|
Loading…
Reference in New Issue
Block a user