From 158237254da27b9f69530231be254c8ede6130e6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 9 Sep 2014 16:46:16 +0100 Subject: [PATCH] fix jfif resunit read see https://github.com/jcupitt/libvips/issues/170 the previous fix just did exif resolution "none", we need jfif "none" as well --- ChangeLog | 3 +++ configure.ac | 6 +++--- libvips/foreign/jpeg2vips.c | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cc989d6c..e3d2d5c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +8/9/14 started 7.40.9 +- support jfif resunit "none" + 8/9/14 started 7.40.8 - fix configure on rhel6 [Lovell] - mono <-> rgb converters were not handling extra bands, thanks James diff --git a/configure.ac b/configure.ac index e1737307..ef43a7f8 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # also update the version number in the m4 macros below -AC_INIT([vips], [7.40.8], [vipsip@jiscmail.ac.uk]) +AC_INIT([vips], [7.40.9], [vipsip@jiscmail.ac.uk]) # required for gobject-introspection AC_PREREQ(2.62) @@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4]) # user-visible library versioning m4_define([vips_major_version], [7]) m4_define([vips_minor_version], [40]) -m4_define([vips_micro_version], [8]) +m4_define([vips_micro_version], [9]) m4_define([vips_version], [vips_major_version.vips_minor_version.vips_micro_version]) @@ -38,7 +38,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date` # binary interface changes not backwards compatible?: reset age to 0 LIBRARY_CURRENT=38 -LIBRARY_REVISION=5 +LIBRARY_REVISION=6 LIBRARY_AGE=0 # patched into include/vips/version.h diff --git a/libvips/foreign/jpeg2vips.c b/libvips/foreign/jpeg2vips.c index 98d8747e..8a468f9d 100644 --- a/libvips/foreign/jpeg2vips.c +++ b/libvips/foreign/jpeg2vips.c @@ -744,6 +744,13 @@ read_jpeg_header( ReadJpeg *jpeg, VipsImage *out ) #endif /*DEBUG*/ switch( cinfo->density_unit ) { + case 0: + /* None. Just set. + */ + xres = cinfo->X_density; + yres = cinfo->Y_density; + break; + case 1: /* Pixels per inch. */