On 05/10/2012 11:00 AM, Paul A. Rubin wrote:
Well, that took a bit of sorting.  Turns out it has nothing to do with either
LyX or LaTeX; it's something sneaky in your image.  Your screenshot is 296x296
pixels, which sounds (and looks on the desktop, or in an image viewer, or in the
LyX GUI) square.  The catch is that the resolution is (rounding a bit) 1024 ppi
(pixels per inch) horizontal v. 768 ppx vertical.  296 px at 768 ppi is more
inches than 296 px at 1024 ppi.  So the "distorted" PDF output is technically
correct.

Thanks for tracking that down.  It seems a bit strange
that GIMP would crop an image with respect to pixels
(displaying the result as square) and yet keep the same
resolution.  I had never noticed that it has a separate
Image > Print Size menu.  Changing that does fix the PDF.

The problem seems to have stemmed from using the option
   -density 1024x768
in the import program.  If I don't use that option the
.png image seems to display and print OK, even after
cropping.

You can, of course, set both the height and width to equal values in LyX and
force a square image.  I also converted your image (using GIMP, but other image
editors can probably do it too) to 296x296 px at 768x768 ppi, and included that
in the document while setting just the width.  That worked too.

Paul




Reply via email to