]> git.lyx.org Git - lyx.git/commit
Fix bug #11180
authorEnrico Forestieri <forenr@lyx.org>
Sun, 24 Jun 2018 18:06:40 +0000 (20:06 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 24 Jun 2018 18:06:40 +0000 (20:06 +0200)
commit380f34a11485c41d812695dc4279b24a5ed5cc07
tree8b9656553fbc37337532f9cc1ca4ce4f769be01c
parentc33506555f5f7193b0cbce6c9878d62a18f37cc9
Fix bug #11180

When a raster image with an advertised pixel density different
from 72 dpi is included in a latex file, the output image dimensions
are scaled by the ratio 72/pixel_density. Hence, if a clipping
bounding box is specified, it has to be scaled by the same ratio,
otherwise the images will be clipped differently on screen and output.
Here we use the extractbb command (present in any TeX distribution)
to ask about the output dimensions of the image as dictated by the
pixel density and compute the scaling ratio by the knowledge of the
actual dimensions. If, for whatever reason, extractbb is not found,
everything goes as before, because the clipping bounding box will
simply not be corrected.
src/insets/InsetGraphics.cpp
src/insets/InsetGraphics.h