SVGs are seemingly treated as bitmap instead of as vectors. When opening a SVG a small viewBox (like 24px) the image becomes very pixelated when zooming in.
I'd like to see SVGs scale without becoming pixelated.
Is this possible to do, or is it way to hard because of limitations with ImageMagick and whatnot?
Hi @bearhagen
This feature is in my todo list.
ImageMagick supports reading SVG in vary dimensions. ImageGlass will just need to load a new image data when user zooms in/out.
However, the current structure of image list stored in memory needs much resource to do it. The team planned to rewrite the ImageGlass.Core.dll, and will be able to do more with multiple-page image formats as well as scallable ones.
Thanks for the post, please keep on following for later update.
Hi,
I see I'm not the only one with this issue, any plans for 2020 regarding this issue?
Hi @Luvideria
I did some investigations for supporting scaling SVG, but I haven't found an optimal way to implement it.
Some of the problems I had are:
I will need to try more solutions.
Thanks for asking :)
Hello @d2phap
If you're actively working on this, it would be awesome if could put out a blog post discussing what you tried and what other options are. It would be at least as interesting as the multi-page TIF format one. Even better if you can go a little more technical. Anyway thank you!
I know that SVG computation is a hot topic even now in research:
in HPG 2019:
https://diglib.eg.org/handle/10.1111/cgf13757
SigAsia 2014:
http://w3.impa.br/~diego/projects/GanEtAl14/
Though many approaches focus on GPU here.
Some other svg implementations are listed here (CPU):
https://github.com/RazrFalcon/resvg
I did some investigations for supporting scaling SVG, but I haven't found an optimal way to implement it.
Some of the problems I had are:
- High CPU and RAM consumption
- Poor performance
Hi. Why not have CEF do the SVG rendering for you? Since this project is written C#, you might want to take a look at CefSharp.
Whatever you decide, good luck! 👍
Hi. Why not have CEF do the SVG rendering for you? Since this project is written C#, you might want to take a look at CefSharp.
CEF, electron, or any UI framework based on V8, literally means poor performance, espcially on Windows
Strange. Experience tells me that CEF is blazing fast. My current SVG viewer is based on CEF. (Too bad it does not have the convenient features of ImageGlass.)
Besides, the SVG rendering in CEF is based on Blink, not V8.
@Riajyuu SVG rendering with bad performance would still be better than the current pixelated rendering though
Strange. Experience tells me that CEF is blazing fast. My current SVG viewer is based on CEF. (Too bad it does not have the convenient features of ImageGlass.)
Besides, the SVG rendering in CEF is based on Blink, not V8.
@skycommand
Sorry if there is any misunderstanding.
Pls allow me rephrase it a bit:
on Windows, if you are rendering any UI component via anything relvant with Blink, V8, Chromium, or whatever similar (like CEF, electron, nodejs), the finally product you get will be really laggy unless users have full SSD.
If your experience was on Mac/Linux, you can expect a totally different story on Windows.
@bjornarhagen
I see you point here. But I just assume it may be spoiling the soup.
You could look into how browsers implement this, such as Internet Explorer 11.
I have been recently looking into changing framework of ImageGlass from WinForms to WPF which is easier to support for scaling SVG and hardware acceleration. It's also better than using chromium embedded.
However, i will need to rewrite almost 70% of ImageGlass code, this is huge work. There will be alpha / beta / moon versions of this new ImageGlass. The final and official release may be landed in a year or two.
Most helpful comment
I have been recently looking into changing framework of ImageGlass from WinForms to WPF which is easier to support for scaling SVG and hardware acceleration. It's also better than using chromium embedded.
However, i will need to rewrite almost 70% of ImageGlass code, this is huge work. There will be alpha / beta / moon versions of this new ImageGlass. The final and official release may be landed in a year or two.