revert dhint check

We added a check that loader ->header() and ->load() methods set the
same dhint. This commit removes that check -- it's not possible to make
header and load match in all cases since images can take so many routes,
and can change between the two events.

If we see performance issues around inappropriate cache sizing again,
try to fix just those cases.
This commit is contained in:
John Cupitt 2022-09-12 10:38:17 +01:00
parent e37487ca2f
commit 3081821636

View File

@ -932,15 +932,11 @@ vips_foreign_load_temp( VipsForeignLoad *load )
static gboolean
vips_foreign_load_iscompat( VipsImage *a, VipsImage *b )
{
/* dhint must match too, or we can get terrible performance with some
* formats.
*/
if( a->Xsize != b->Xsize ||
a->Ysize != b->Ysize ||
a->Bands != b->Bands ||
a->Coding != b->Coding ||
a->BandFmt != b->BandFmt ||
a->dhint != b->dhint ) {
a->BandFmt != b->BandFmt ) {
vips_error( "VipsForeignLoad", "%s",
_( "images do not match between header and load" ) );
return( FALSE );