]> 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)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 4 Oct 2018 04:40:19 +0000 (00:40 -0400)
commitea81faa911fc2561a017eb36c3a3d0bbe5b86756
treed60bd5e76712afe38de3159d836a28b821021437
parente67c119d804b8b7b4a17a264c2012739a10b17f9
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.

(cherry picked from commit 380f34a11485c41d812695dc4279b24a5ed5cc07)
src/insets/InsetGraphics.cpp
src/insets/InsetGraphics.h
status.23x