summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-03-12 04:13:41 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-03-12 04:13:41 +0000
commitfd994d7434131365159843eaa23f38ac4d8cd8da (patch)
treeaffb7dac2bfb6e781a708b62b5427df43c806531 /Build
parent338d9f42f8d6ff6e532840f8e8fc95ee4cd537e1 (diff)
xetexdir/image/jpegimage.c: Fix a bug introduced by me on 2015-02-15.
git-svn-id: svn://tug.org/texlive/trunk@36493 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-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);