Aleksandar Kanchev wrote:

> Hello list,
> 
> whats wrong with LyX and PNG files?

Nothing. PNG files usually work fine.

> I draw a diagram in MS Visio, export 

Since Visio produces vector graphics it would be better to use a vector
format, e.g. EMF. Then you will not get any scaling problems. See
http://wiki.lyx.org/Windows/MetafileToEPSConverter for instructions on
getting good EMF/WMF support in LyX.

> it to PNG, open it on LyX 1.5.5 (on Fedora 9). The PNG looks  nice in
> LyX itself, but when I create a pdf the picture gets over-scaled beyond
> the page size. I tried forcing the picture size in lyx but it looked
> like it was first over-scaled, then scaled again to the size I gave it
> and as a result it looked completely ugly. This seems to be a problem
> with PNG files, I tried exporting from MS Visio the same file with the
> same size in JPEG and it displayed ok in LyX and the picture wasn't
> over-scaled I left it to automatically scale the picture.
> 
> Am I doing something wrong? Is there a known problem with PNG files?
> Could it be fixed? I really don't like JPEG, the diagram looks better in
> PNG. The picture size is 14x11,2 cm or 529x423 pixels.

It is the nature of bitmap files that the size is always measured in pixels,
never in physical length units like cm. Some bitmap formats do allow to
specify a resolution, so that you can relate pixels to physical lengths,
but this setting is usually ignored. In order to get predictable results
you should therefore avoid the setting "Original size" for bitmap files and
specify a fixed size, either in physical length units or LaTeX variables,
e.g. page width. If you get ugly looking PNGs you are probably not using
pdflatex (which supports PNG directly), and a bad PNG->EPS converter.


Georg

Reply via email to