diff options
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/writejpg.c')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writejpg.c | 7 |
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) { |