better heif signature detection

This commit is contained in:
John Cupitt 2020-09-23 08:13:52 +01:00
parent 553eb73965
commit e4b711a358
2 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,7 @@
- dzsave in iiif mode could set info.json dimensions off by one [Linden6] - dzsave in iiif mode could set info.json dimensions off by one [Linden6]
- pdfload allows dpi and scale to both be set [le0daniel] - pdfload allows dpi and scale to both be set [le0daniel]
- allow gaussblur sigma zero, meaning no blur - allow gaussblur sigma zero, meaning no blur
- better heif signature detection [lovell]
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

View File

@ -254,7 +254,7 @@ static const char *heif_magic[] = {
* *
* enum heif_filetype_result result = heif_check_filetype( buf, 12 ); * enum heif_filetype_result result = heif_check_filetype( buf, 12 );
* *
* but it's very conservative and seems to be missing some of the Noka hief * but it's very conservative and seems to be missing some of the Nokia hief
* types. * types.
*/ */
static int static int
@ -266,7 +266,8 @@ vips_foreign_load_heif_is_a( const char *buf, int len )
if( len >= 12 ) { if( len >= 12 ) {
int i; int i;
if ( memcmp( buf, iso, 4 ) != 0 && memcmp( buf, three_gp, 4 ) != 0 ) if( memcmp( buf, iso, 4 ) != 0 &&
memcmp( buf, three_gp, 4 ) != 0 )
return ( 0 ); return ( 0 );
for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ ) for( i = 0; i < VIPS_NUMBER( heif_magic ); i++ )