diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-25 23:12:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-25 23:12:24 +0000 |
commit | 64ea3583cea282dcc8ca3d73eee931f3e7a701a8 (patch) | |
tree | 260bf87a61001d353d442455d161d5e8108af5ef /Build/source/texk/dvipdfmx/src/pngimage.c | |
parent | 7660c21eadc2ae14f6ac9819d65519aefd535be7 (diff) |
update to snapshot 20090522
git-svn-id: svn://tug.org/texlive/trunk@13470 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/pngimage.c')
-rw-r--r-- | Build/source/texk/dvipdfmx/src/pngimage.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Build/source/texk/dvipdfmx/src/pngimage.c b/Build/source/texk/dvipdfmx/src/pngimage.c index 6d4953650cd..db6ef2bcc95 100644 --- a/Build/source/texk/dvipdfmx/src/pngimage.c +++ b/Build/source/texk/dvipdfmx/src/pngimage.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pngimage.c,v 1.26 2009/03/24 02:07:48 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pngimage.c,v 1.27 2009/05/10 17:04:54 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -53,6 +53,8 @@ #include "error.h" #include "mem.h" +#include "dvipdfmx.h" + #include "pdfcolor.h" #include "pdfobj.h" @@ -210,10 +212,15 @@ png_include_image (pdf_ximage *ximage, FILE *png_file) info.width = width; info.height = height; info.bits_per_component = bpc; - if (xppm > 0) - info.xdensity = 72.0 / 0.0254 / xppm; - if (yppm > 0) - info.ydensity = 72.0 / 0.0254 / yppm; + + if (compat_mode) + info.xdensity = info.ydensity = 72.0 / 100.0; + else { + if (xppm > 0) + info.xdensity = 72.0 / 0.0254 / xppm; + if (yppm > 0) + info.ydensity = 72.0 / 0.0254 / yppm; + } stream = pdf_new_stream (STREAM_COMPRESS); stream_dict = pdf_stream_dict(stream); @@ -1040,10 +1047,12 @@ png_get_bbox (FILE *png_file, long *width, long *height, if (png_ptr) png_destroy_read_struct(&png_ptr, NULL, NULL); - if (xppm > 0) - *xdensity = 72.0 / 0.0254 / xppm; - if (yppm > 0) - *ydensity = 72.0 / 0.0254 / yppm; + if (compat_mode) + *xdensity = *ydensity = 72.0 / 100.0; + else { + *xdensity = xppm ? 72.0 / 0.0254 / xppm : 1.0; + *ydensity = yppm ? 72.0 / 0.0254 / yppm : 1.0; + } return 0; } |