summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
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;