jpeg read is less fussy about exif data

even read truncated exif
This commit is contained in:
John Cupitt 2012-11-21 18:34:20 +00:00
parent 006d4ece17
commit 65b4056c84
2 changed files with 20 additions and 22 deletions

1
TODO
View File

@ -1,3 +1,4 @@
- look into preserving IPTC data
- check libtool version number, should be binary-compat with 7.30

View File

@ -79,9 +79,9 @@
*/
/*
*/
#define DEBUG_VERBOSE
#define DEBUG
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -598,13 +598,11 @@ read_exif( VipsImage *im, void *data, int data_length )
#ifdef HAVE_EXIF
{
ExifData *ed;
VipsExif ve;
if( !(ed = exif_data_new_from_data( data, data_length )) )
return( -1 );
if( ed->size > 0 ) {
VipsExif ve;
#ifdef DEBUG_VERBOSE
show_tags( ed );
show_values( ed );
@ -630,7 +628,6 @@ read_exif( VipsImage *im, void *data, int data_length )
set_vips_resolution( im, ed );
attach_thumbnail( im, ed );
}
exif_data_free( ed );
}