[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: PDF graphics is blurred in LyX when scaled
From:       Stephan Witt <st.witt () gmx ! net>
Date:       2018-11-12 13:36:29
Message-ID: FA7F3D37-2703-4681-A039-F97F31304583 () gmx ! net
[Download RAW message or body]

Am 12.11.2018 um 14:03 schrieb Stephen Buonopane <sbuonopa@bucknell.edu>:
> 
> > On Nov 12, 2018, at 7:52 AM, Baris Erkus <bariserkus@hotmail.com> wrote:
> > 
> > On 12-Nov-18 3:38 PM, Kornel Benko wrote:
> > > Am Montag, 12. November 2018 13:21:58 CET schrieb Daniel <xracoonx@gmx.de>:
> > > > On 11/11/2018 19:14, Paul A. Rubin wrote:
> > > > > On 11/10/18 9:45 PM, Baris Erkus wrote:
> > > > > > Hello,
> > > > > > 
> > > > > > PDF graphics appears to be blurred in LyX when scaled from Graphics
> > > > > > Options --> LaTeX and LyX options --> Show in LyX --> Scale on Screen.
> > > > > > 
> > > > > > I am not sure if this is a feature to reduce CPU rendering workload or
> > > > > > smtg, but it would be really nice to have a clear view of the PDF
> > > > > > while working on the document rather than looking at it using a PDF
> > > > > > viewer.
> > > > > > 
> > > > > > See MWE and the view from LyX below.
> > > > > > 
> > > > > > Baris
> > > > > > 
> > > > > > 
> > > > > The image in your PDF file is a bitmap (PNG), so I don't hold out much
> > > > > hope for being able to zoom it without loss of fidelity.
> > > > Why do you think the graphic in the PDF is a bitmap? I have zoomed in on
> > > > it and never got any pixels to see. At least it must be an extremely
> > > > high resolution bitmap then.
> > > > 
> > > > Daniel
> > > > 
> > > Because PNG format is bitmap?
> > > 	PNG image data, 652 x 668, 8-bit/color RGB, non-interlaced
> > > 
> > > 	Kornel
> > > 
> > The external graphics is in PDF, which is attached to the original 
> > e-mail; it was generated in Tikz, so it is a vector graphics. No 
> > question about it.  When inserted into LyX, maybe LyX creates a 
> > temporary bitmap or PNG file to show to the user, I am not sure.
> > 
> > It should not be a big thing to show a higher resolution graphics or to 
> > let the user decide for possible performance issues. One day I will be 
> > doing all these small modification by myself, but when that I do not 
> > know... :-)
> > 
> > Baris
> 
> 
> Yes LyX creates a PNG file for the on-screen preview within LyX (It also does this \
> for the math preview) If you dig into the LyX temp directory you will find all of \
> the PNG files. 
> I recall that an older version of LyX (on Mac) did not use PNG for on-screen \
> previews, in which case it may be possible to revert to the older behavior even in \
> 2.3.X?

There are fundamental differences between the handling of SVG and PDF files in LyX.

LyX is using Qt plugins to render the images on screen.

For PDF files one has to convert them to temporary bitmap files because there is no \
plugin to render them directly. (Perhaps this is not true anymore.) For SVG files \
there is a plugin. But this one is limited in functionality. There was a decision to \
not use it for on-screen display because of the complaints regarding missing details.

The problem with the temporary images is the fixed resolution of the generated \
images. The used cache is not invalidated in case of higher preview zoom levels. \
Furthermore you can have different resolutions at runtime too. In case of a machine \
with multiple monitors with different physical resolutions you get different values \
for moving the LyX window around.

Stephan=


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic