Re: aspect ratio in figures

2012-05-10 Thread Paul A . Rubin
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.

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



Re: aspect ratio in figures

2012-05-10 Thread Allen Barker

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







Re: aspect ratio in figures

2012-05-10 Thread Paul A . Rubin
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.

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



Re: aspect ratio in figures

2012-05-10 Thread Allen Barker

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







Re: aspect ratio in figures

2012-05-10 Thread Paul A . Rubin
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.

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



Re: aspect ratio in figures

2012-05-10 Thread Allen Barker

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







Re: aspect ratio in figures

2012-05-08 Thread Paul A . Rubin
Allen Barker Allen.L.Barker at gmail.com writes:

 
 On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

 Is your version of ImageMagick current?
 
 It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16
 
 


Perhaps you should post a minimal example (short LyX document plus image file).

Paul




Re: aspect ratio in figures

2012-05-08 Thread Allen Barker

On 05/08/2012 06:09 PM, Paul A. Rubin wrote:

Allen BarkerAllen.L.Barkerat  gmail.com  writes:



On 05/03/2012 05:44 PM, Paul A. Rubin wrote:



Is your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Perhaps you should post a minimal example (short LyX document plus image file).


OK, I've included the Lyx file and the .png image.  The
image is just a screenshot from the ImageMagick import
command, cropped in Gimp to be perfectly square.

The PDF and PS output is definitely not square on my
system: it is vertically stretched.




minimalExample.lyx
Description: application/lyx
attachment: screenshot.png

Re: aspect ratio in figures

2012-05-08 Thread Paul A . Rubin
Allen Barker Allen.L.Barker at gmail.com writes:

 
 On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

 Is your version of ImageMagick current?
 
 It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16
 
 


Perhaps you should post a minimal example (short LyX document plus image file).

Paul




Re: aspect ratio in figures

2012-05-08 Thread Allen Barker

On 05/08/2012 06:09 PM, Paul A. Rubin wrote:

Allen BarkerAllen.L.Barkerat  gmail.com  writes:



On 05/03/2012 05:44 PM, Paul A. Rubin wrote:



Is your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Perhaps you should post a minimal example (short LyX document plus image file).


OK, I've included the Lyx file and the .png image.  The
image is just a screenshot from the ImageMagick import
command, cropped in Gimp to be perfectly square.

The PDF and PS output is definitely not square on my
system: it is vertically stretched.




minimalExample.lyx
Description: application/lyx
attachment: screenshot.png

Re: aspect ratio in figures

2012-05-08 Thread Paul A . Rubin
Allen Barker  gmail.com> writes:

> 
> On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

> >Is your version of ImageMagick current?
> 
> It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16
> 
> 


Perhaps you should post a minimal example (short LyX document plus image file).

Paul




Re: aspect ratio in figures

2012-05-08 Thread Allen Barker

On 05/08/2012 06:09 PM, Paul A. Rubin wrote:

Allen Barker  writes:



On 05/03/2012 05:44 PM, Paul A. Rubin wrote:



Is your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Perhaps you should post a minimal example (short LyX document plus image file).


OK, I've included the Lyx file and the .png image.  The
image is just a screenshot from the ImageMagick "import"
command, cropped in Gimp to be perfectly square.

The PDF and PS output is definitely not square on my
system: it is vertically stretched.




minimalExample.lyx
Description: application/lyx
<>

Re: aspect ratio in figures

2012-05-07 Thread Allen Barker

On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Re: aspect ratio in figures

2012-05-07 Thread Allen Barker

On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Re: aspect ratio in figures

2012-05-07 Thread Allen Barker

On 05/03/2012 05:44 PM, Paul A. Rubin wrote:

Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?


It is Version: ImageMagick 6.6.5-10 2011-11-03 Q16





Re: aspect ratio in figures

2012-05-03 Thread Paul A . Rubin
Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?

Paul



Re: aspect ratio in figures

2012-05-03 Thread Paul A . Rubin
Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?

Paul



Re: aspect ratio in figures

2012-05-03 Thread Paul A . Rubin
Sounds like something funny going on with ImageMagick, but it's hard to say.  Is
your version of ImageMagick current?

Paul



Re: aspect ratio in figures

2012-04-25 Thread Allen Barker

On 04/23/2012 08:27 AM, Allen Barker wrote:


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx. This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert-graphics and set
the width to some value (with the maintain aspect ratio box
checked). The preview looks fine. But, when the file is
printed in PDF the aspect ratio is not preserved. For
example, a square image is stretched too much vertically
(by a very noticeable amount). Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should. If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?


I still haven't figured out what was going on, but I did
discover that the problem does not occur with the .gif
format.  This works well enough for the screenshot I was
inserting.






Re: aspect ratio in figures

2012-04-25 Thread Allen Barker

On 04/23/2012 08:27 AM, Allen Barker wrote:


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx. This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert-graphics and set
the width to some value (with the maintain aspect ratio box
checked). The preview looks fine. But, when the file is
printed in PDF the aspect ratio is not preserved. For
example, a square image is stretched too much vertically
(by a very noticeable amount). Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should. If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?


I still haven't figured out what was going on, but I did
discover that the problem does not occur with the .gif
format.  This works well enough for the screenshot I was
inserting.






Re: aspect ratio in figures

2012-04-25 Thread Allen Barker

On 04/23/2012 08:27 AM, Allen Barker wrote:


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx. This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert->graphics and set
the width to some value (with the maintain aspect ratio box
checked). The preview looks fine. But, when the file is
printed in PDF the aspect ratio is not preserved. For
example, a square image is stretched too much vertically
(by a very noticeable amount). Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should. If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?


I still haven't figured out what was going on, but I did
discover that the problem does not occur with the .gif
format.  This works well enough for the screenshot I was
inserting.






aspect ratio in figures

2012-04-23 Thread Allen Barker


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx.  This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert-graphics and set
the width to some value (with the maintain aspect ratio box
checked).  The preview looks fine.  But, when the file is
printed in PDF the aspect ratio is not preserved.  For
example, a square image is stretched too much vertically
(by a very noticeable amount).  Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should.  If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?






aspect ratio in figures

2012-04-23 Thread Allen Barker


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx.  This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert-graphics and set
the width to some value (with the maintain aspect ratio box
checked).  The preview looks fine.  But, when the file is
printed in PDF the aspect ratio is not preserved.  For
example, a square image is stretched too much vertically
(by a very noticeable amount).  Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should.  If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?






aspect ratio in figures

2012-04-23 Thread Allen Barker


I'm having some problems with the aspect ratio of figures
which are inserted into Lyx.  This is with version 2.0.3
on a Fedora 15 system.

I insert a .png screenshot with insert->graphics and set
the width to some value (with the maintain aspect ratio box
checked).  The preview looks fine.  But, when the file is
printed in PDF the aspect ratio is not preserved.  For
example, a square image is stretched too much vertically
(by a very noticeable amount).  Postscript is the same.

If I set both the width and the height then the PDF
comes out as it should.  If I view as LyxHTML then the
size is also correct.

I'm just using the default article style, with no packages
inserted and an empty preamble.

Any ideas what's going on?