Skip to content

Commit 2fbd84a

Browse files
committed
no warning about too-small images with zero for resolution values
git-svn-id: svn://tug.org/texlive/trunk/Build/source@73904 c570f23f-e606-0410-a88d-b1316a301751
1 parent 6e15298 commit 2fbd84a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

texk/web2c/pdftexdir/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2025-02-11 Max Chernoff <[email protected]>
2+
3+
* pdftex.web (scale_image): no warning if both resolutions are zero.
4+
https://tug.org/pipermail/pdftex/2025-February/009441.html
5+
16
2025-02-02 Karl Berry <[email protected]>
27

38
* pdftex.ch: try to give original files and line numbers for changes.

texk/web2c/pdftexdir/pdftex.web

+5-1
Original file line numberDiff line numberDiff line change
@@ -34451,7 +34451,11 @@ begin
3445134451
end;
3445234452
if (x <= 0) or (y <= 0) or (xr < 0) or (yr < 0) then
3445334453
pdf_error("ext1", "invalid image dimensions");
34454-
if (x / one_inch >= xr) or (y / one_inch >= yr) then begin
34454+
if (xr = 0) and (yr = 0) then begin
34455+
{If both resolutions are zero, that suggests that the resolution data
34456+
is missing, so we should never issue a warning.}
34457+
end
34458+
else if (x / one_inch >= xr) or (y / one_inch >= yr) then begin
3445534459
{It's better to warn and ignore too-small resolutions given in
3445634460
the image file, usually 1dpi x 1dpi, to avoid arithmetic overflow.}
3445734461
xr := 0;

0 commit comments

Comments
 (0)