summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-12-21 23:13:12 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-12-21 23:13:12 +0000
commit39a0b2cabeada14997e42893523dda6fcac1f3d7 (patch)
treeba91e3b7c6a1b90a1aa54157cf5c1d682a950a15 /Build
parent143ea09a6d778371ec1da840f17773ecceea4d37 (diff)
dvipdfm-x/jpegimage.c: If j_info->xdpi and j_info->ydpi are not determined in JPEG_scan_file(), they are assumed to be 72.0.
git-svn-id: svn://tug.org/texlive/trunk@46109 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog5
-rw-r--r--Build/source/texk/dvipdfm-x/jpegimage.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 80e96977c5b..92b25c4945f 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * jpegimage.c: If j_info->xdpi and j_info->ydpi are not
+ determined in JPEG_scan_file(), they are assumed to be 72.0.
+
2017-12-09 Jiang Jiang <gzjjgod@gmail.com>
* tt_cmap.c (is_PUA_or_presentation, add_to_cmap_if_used):
diff --git a/Build/source/texk/dvipdfm-x/jpegimage.c b/Build/source/texk/dvipdfm-x/jpegimage.c
index fb840ee2310..f9bfb2bca91 100644
--- a/Build/source/texk/dvipdfm-x/jpegimage.c
+++ b/Build/source/texk/dvipdfm-x/jpegimage.c
@@ -369,10 +369,15 @@ jpeg_get_density (struct JPEG_info *j_info, double *xdensity, double *ydensity)
}
/*
- * j_info->xdpi and j_info->ydpi are already determined
- * because jpeg_get_density() is always called after
- * JPEG_scan_file().
+ * j_info->xdpi and j_info->ydpi are determined in most cases
+ * in JPEG_scan_file(). FIXME: However, in some kinds of JPEG files,
+ * j_info->xdpi, and j_info->ydpi are not determined in
+ * JPEG_scan_file(). In this case we assume
+ * that j_info->xdpi = j_info->ydpi = 72.0.
*/
+ if (j_info->xdpi < 0.1 && j_info->ydpi < 0.1) {
+ j_info->xdpi = j_info->ydpi = 72.0;
+ }
*xdensity = 72.0 / j_info->xdpi;
*ydensity = 72.0 / j_info->ydpi;