summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/xetexdir/image/jpegimage.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
index fd0112cea8a..3db7f6f83e3 100644
--- a/Build/source/texk/web2c/xetexdir/ChangeLog
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-12 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * image/jpegimage.c: Fix a bug introduced by me on 2015-02-15.
+
2015-02-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* XeTeX_pic.c and image/jpegimage.c: Revert. The changes in 2015-02-09
diff --git a/Build/source/texk/web2c/xetexdir/image/jpegimage.c b/Build/source/texk/web2c/xetexdir/image/jpegimage.c
index feccb1aa4b8..4f40e410ca0 100644
--- a/Build/source/texk/web2c/xetexdir/image/jpegimage.c
+++ b/Build/source/texk/web2c/xetexdir/image/jpegimage.c
@@ -120,8 +120,8 @@ JPEG_info_init (struct JPEG_info *j_info)
j_info->bits_per_component = 0;
j_info->num_components = 0;
- j_info->xdpi = 72.0;
- j_info->ydpi = 72.0;
+ j_info->xdpi = 0.0;
+ j_info->ydpi = 0.0;
j_info->flags = 0;
j_info->num_appn = 0;
@@ -307,9 +307,14 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, unsigned short length)
}
}
}
-
- j_info->xdpi = xres * res_unit;
- j_info->ydpi = yres * res_unit;
+/*
+ Do not overwrite if j_info->xdpi and j_info->ydpi are
+ already determined as JFIF
+*/
+ if (j_info->xdpi < 0.1 && j_info->ydpi < 0.1) {
+ j_info->xdpi = xres * res_unit;
+ j_info->ydpi = yres * res_unit;
+ }
err:
RELEASE(buffer);