feh icon indicating copy to clipboard operation
feh copied to clipboard

Make SVG files scalable on resize

Open GreenLunar opened this issue 2 years ago • 3 comments

Scalable upon resize ~~Maybe this is not a good idea and would fault performances (SBC or 64-bit, doesn't matter).~~

~~Scale to a minimum dimension~~ ~~Scale SVG files to a minimum size so that it would be easy on the eyes to view an SVG file with a scale too small.~~

GreenLunar avatar Mar 08 '22 16:03 GreenLunar

Scalable upon resize Maybe this is not a good idea and would fault performances (SBC or 64-bit, doesn't matter).

I correct myself. Scaling upon resize IS a good idea, because resize in Feh is pixelized as long as user holds the mouse button, and once user releases the mouse button, image is rendered again (actually gets a little blurred for raster images).

Scale to a minimum dimension Scale SVG files to a minimum size so that it would be easy on the eyes to view an SVG file with a scale too small.

This might be a good idea, but shouldn't come instead of the first suggestion.

GreenLunar avatar Mar 27 '22 06:03 GreenLunar

I've found you can cheese it by modifying the width/height attributes of the SVG

normal: width="41cm" height="47cm" viewBox="0 0 4100 4700" [ I2P ] normal.png

larger: width="81cm" height="87cm" viewBox="0 0 4100 4700" [ I2P ] larger.png

smaller: width="21cm" height="27cm" viewBox="0 0 4100 4700" [ I2P ] smaller.png

(GH can't preview pngs through hash-links like this, so sorry for no inline images)

I only have to ask why I can't disable metrics completely so the resolution increases automatically as you zoom (like EoM does)

it's an SVG, why should there be resolution limits on vectors just rasterize to the main FBO without matrics, so it's always sharp no matter how close you zoom

Tcll avatar Jun 29 '23 16:06 Tcll

Perhaps lloking into how LXImage-Qt scales SVG would help https://github.com/LXQtBot/lximage-qt

GreenLunar avatar Jun 30 '23 03:06 GreenLunar