Skip to content

Commit

Permalink
no warning about too-small images with zero for resolution values
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@73904 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Feb 11, 2025
1 parent 6e15298 commit 2fbd84a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions texk/web2c/pdftexdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2025-02-11 Max Chernoff <tex@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@freefriends.org>

* pdftex.ch: try to give original files and line numbers for changes.
Expand Down
6 changes: 5 additions & 1 deletion texk/web2c/pdftexdir/pdftex.web
Original file line number Diff line number Diff line change
Expand Up @@ -34451,7 +34451,11 @@ begin
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;
Expand Down

0 comments on commit 2fbd84a

Please sign in to comment.