Tommi Prami 154 Posted Monday at 03:33 AM (edited) Hello. Coworker made this: https://github.com/TextEditorPro/Png2Svg Kind of brute force Png to Svg conversion. Depenging on the case, this might be good first step to the using Svg-icons in your project. Like you don't mind if files are bit bigger . Or you have single size bitmaps which get resampled for different sizes and the blurryness really bugs you. -Tee- Edited Monday at 03:43 AM by Tommi Prami Typo fixed 4 Share this post Link to post
Tommi Prami 154 Posted Monday at 09:42 AM And... I bet Lasse will accept pull requests, if you find a way to make it better. I would bet that some algorithm to analize color and/or tranparency cradients would make way smaller Svg-files. For me the vector graphics always has been ppure magic, but would guess, that som e cases those gradients would be possible to analyze to furher optimize the file... Molst likely justr rectangles with gradients would be goodf addition... -Tee- Share this post Link to post
Anders Melander 2037 Posted Monday at 10:10 AM What's the use case for this? I mean what problem does it solve? Given that it just converts pixels to vector rectangles I don't really see the point. The blurriness you get when upscaling a bitmap is by design. You can just use another resampling method if the blur is a problem. (Just thinking out loud, so to speak; I understood that you aren't the author) Share this post Link to post
Tommi Prami 154 Posted Monday at 10:19 AM 2 minutes ago, Anders Melander said: What's the use case for this? I mean what problem does it solve? Given that it just converts pixels to vector rectangles I don't really see the point. The blurriness you get when upscaling a bitmap is by design. You can just use another resampling method if the blur is a problem. (Just thinking out loud, so to speak; I understood that you aren't the author) At least we have blurriness problem. And resulted pixel svg stays grispier. But anyones mileage will definetely wary, if your exe is 150mb and if ypu make it 151mb, it is not big of a deal. If visual appearance is better. Have not checked that is resampling methods of Delphi virtual image list adjustable... Havent heard anything of such, I think. For use this could be good way to go forward. Not sure yet. Way better than trying to learn vector graphis and redrawing all aboiut 300 icons to svg, or paying graphic artist to do it for us. Most likely would cost 10k€ etc... I would not even think doing that for less Because we need quite many custom icons thaty are not available in any collections. -Tee- Share this post Link to post
Tommi Prami 154 Posted Monday at 10:41 AM (edited) 36 minutes ago, Anders Melander said: What's the use case for this? I mean what problem does it solve? My personal rationale is that you can onece and for all change icon technology/source from bitmap to vectorm and with for us, acceptable result. After that one can start pondering how to get better and way more optimal Svg-files. Anyhow, fully understanmd that this is not for even close good enough for all. -Tee- Edited Monday at 10:47 AM by Tommi Prami 1 Share this post Link to post
Anders Melander 2037 Posted Monday at 12:45 PM 1 hour ago, Tommi Prami said: you can onece and for all change icon technology/source from bitmap to vectorm and with for us, acceptable result. Fair point. FWIW, I doubt that the method it uses can be improved much; Small color bitmaps often employ techniques such as unconscious inference, color psychology, and patterns to trick the brain into producing a better image than what would normally be possible given the available pixels. Larger bitmaps is another story. Share this post Link to post
Tommi Prami 154 Posted Tuesday at 03:40 AM 14 hours ago, Anders Melander said: Fair point. FWIW, I doubt that the method it uses can be improved much; Small color bitmaps often employ techniques such as unconscious inference, color psychology, and patterns to trick the brain into producing a better image than what would normally be possible given the available pixels. Larger bitmaps is another story. Lasse made new algorithm yesterday, and said that in his tests file size dropped about 50% Have not tested my self... Share this post Link to post
Anders Melander 2037 Posted Tuesday at 11:31 AM Can you ask him what he did? I can't decipher it from the commit diff. The algorithm appears unchanged though. Share this post Link to post
Tommi Prami 154 Posted Wednesday at 09:03 AM 21 hours ago, Anders Melander said: Can you ask him what he did? I can't decipher it from the commit diff. The algorithm appears unchanged though. Added Paths, instead of rectangles etc... -Tee- 1 Share this post Link to post