texlive[46109] Build/source/texk/dvipdfm-x: dvipdfm-x/jpegimage.c: If

commits+kakuto at tug.org commits+kakuto at tug.org
Fri Dec 22 00:13:13 CET 2017


Revision: 46109
          http://tug.org/svn/texlive?view=revision&revision=46109
Author:   kakuto
Date:     2017-12-22 00:13:12 +0100 (Fri, 22 Dec 2017)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/jpegimage.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-12-21 01:22:41 UTC (rev 46108)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-12-21 23:13:12 UTC (rev 46109)
@@ -1,3 +1,8 @@
+2017-12-21  Akira Kakuto  <kakuto at 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 at gmail.com>
 
 	* tt_cmap.c (is_PUA_or_presentation, add_to_cmap_if_used):

Modified: trunk/Build/source/texk/dvipdfm-x/jpegimage.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2017-12-21 01:22:41 UTC (rev 46108)
+++ trunk/Build/source/texk/dvipdfm-x/jpegimage.c	2017-12-21 23:13:12 UTC (rev 46109)
@@ -369,10 +369,15 @@
   }
 
 /*
- * 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;
 



More information about the tex-live-commits mailing list