summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/writejpg.c
diff options
context:
space:
mode:
authorHan The Thanh <hanthethanh@gmail.com>2009-07-13 08:40:49 +0000
committerHan The Thanh <hanthethanh@gmail.com>2009-07-13 08:40:49 +0000
commitce020ad65649f6c6ad6721038fe63aa3cf8f34b2 (patch)
tree3a57a1bf90defae56a025fdb0186dc5a512f7866 /Build/source/texk/web2c/pdftexdir/writejpg.c
parent10f6b2c95a4f134435e20f90eb9d3ca04f5f5e85 (diff)
minor fixes for pdftex
git-svn-id: svn://tug.org/texlive/trunk@14235 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/writejpg.c')
-rw-r--r--Build/source/texk/web2c/pdftexdir/writejpg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/writejpg.c b/Build/source/texk/web2c/pdftexdir/writejpg.c
index d07db2f4a91..e1a9cacef88 100644
--- a/Build/source/texk/web2c/pdftexdir/writejpg.c
+++ b/Build/source/texk/web2c/pdftexdir/writejpg.c
@@ -134,6 +134,13 @@ void read_jpg_info(integer img)
break;
}
}
+ /* if either xres or yres is 0 but the other isn't, set it to the value of the other */
+ if ((img_xres(img) == 0) && (img_yres(img) != 0)) {
+ img_xres(img) = img_yres(img);
+ }
+ if ((img_yres(img) == 0) && (img_xres(img) != 0)) {
+ img_yres(img) = img_xres(img);
+ }
}
xfseek(jpg_ptr(img)->file, 0, SEEK_SET, cur_file_name);
while (1) {