texlive[73904] Build/source/texk/web2c/pdftexdir: no warning about

commits+karl at tug.org commits+karl at tug.org
Tue Feb 11 23:47:50 CET 2025


Revision: 73904
          https://tug.org/svn/texlive?view=revision&revision=73904
Author:   karl
Date:     2025-02-11 23:47:50 +0100 (Tue, 11 Feb 2025)
Log Message:
-----------
no warning about too-small images with zero for resolution values

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
    trunk/Build/source/texk/web2c/pdftexdir/pdftex.web

Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog	2025-02-11 22:38:53 UTC (rev 73903)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog	2025-02-11 22:47:50 UTC (rev 73904)
@@ -1,3 +1,8 @@
+2025-02-11  Max Chernoff  <tex at maxchernoff.ca>
+
+	* pdftex.web (scale_image): no warning if both resolutions are zero.
+	https://tug.org/pipermail/pdftex/2025-February/009441.html
+
 2025-02-02  Karl Berry  <karl at freefriends.org>
 
 	* pdftex.ch: try to give original files and line numbers for changes.

Modified: trunk/Build/source/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/pdftex.web	2025-02-11 22:38:53 UTC (rev 73903)
+++ trunk/Build/source/texk/web2c/pdftexdir/pdftex.web	2025-02-11 22:47:50 UTC (rev 73904)
@@ -34451,7 +34451,11 @@
     end;
     if (x <= 0) or (y <= 0) or (xr < 0) or (yr < 0) then
         pdf_error("ext1", "invalid image dimensions");
-    if (x / one_inch >= xr) or (y / one_inch >= yr) then begin
+    if (xr = 0) and (yr = 0) then begin
+        {If both resolutions are zero, that suggests that the resolution data
+         is missing, so we should never issue a warning.}
+    end
+    else if (x / one_inch >= xr) or (y / one_inch >= yr) then begin
         {It's better to warn and ignore too-small resolutions given in
          the image file, usually 1dpi x 1dpi, to avoid arithmetic overflow.}
         xr := 0;



More information about the tex-live-commits mailing list.