Log in

View Full Version : Lossless Resizing with SVGs


jay123210599
4th February 2025, 01:25
Is it true that you can resize SVG files to any resolution you want without losing quality?

If so, here's a png file I converted to svg using ImageMagick. Try and see if you can resize to any resolution without loss.

https://www.mediafire.com/file/wl1ey2krsg0boj8/testers.7z/file

poisondeathray
4th February 2025, 03:47
Is it true that you can resize SVG files to any resolution you want without losing quality?

If so, here's a png file I converted to svg using ImageMagick. Try and see if you can resize to any resolution without loss.

https://www.mediafire.com/file/wl1ey2krsg0boj8/testers.7z/file


Yes, you can scale losslessly ( even downscale) as a vector format (as a vector only) if the program can handle lossless scaling of vectors. Imagemagick does not. A free vector manipulation tool would be inkscape

Lossless scaling of vectors does NOT change the exported file size of a vector (except for a few bytes) - so if your goal was to reduce disk space, you're wasting your time. Notice you increased the filesize converting to a vector in the first place.

All lossless scaling basically does is keep the original information, but fill in the data fields about what size to re-render the new file at, so when the viewing application opens the resized vector, it re-renders at the newly specified dimensions.

Vectors can be rendered at different dimensions, with far less aliasing and quality issues than "rasterized" images. But if you start with a lossy rasterized image with some compression noise such as your PNG image , it will be "less clean" than scaling a clean vector in the first place

wonkey_monkey
4th February 2025, 11:16
Your SVG just has the PNG embedded in it. It hasn't converted anything. SVG vector elements can be scaled to any size without going blocky, but that doesn't apply to embedded PNGs.

StainlessS
4th February 2025, 17:28
Google "png to svg convert"
https://www.google.co.uk/search?q=png+to+svg+convert

EDIT: and a YouTube search "png to svg convert"
https://www.youtube.com/results?search_query=png+to+svg+convert

EDIT:
How to Convert PNG Files to SVG File Format for FREE!:- https://www.youtube.com/watch?v=A5TOBCRD_ic
Above gotten from Youtube Search on "offline" png to svg convert":- https://www.youtube.com/results?search_query=%22offline%22+png+to+svg+convert

No idea if any of them any good.

Z2697
4th February 2025, 17:58
"vectorize" the raster images is a much more difficult problem to begin with.

jay123210599
5th February 2025, 17:48
Can any of you answer this question?

https://forum.doom9.org/showthread.php?t=186128