meyerweb / px2svg Goto Github PK
View Code? Open in Web Editor NEWConverts raster images to SVG, using color-run optimization.
License: ISC License
Converts raster images to SVG, using color-run optimization.
License: ISC License
Is there any way to do something similar to what SVGO does to optimize the output SVG?
Should we add a second parameter threshold to allow colour compression? Similar colours, maybe based on hue, could be merged based on the supplied threshold value. That should lead to reduced file sizes.
I don't mind giving this a shot over the weekend if it's something worth adding.
There’s something broken with the threshold code. The problem: anything above a zero threshold makes it likely that the produced SVG will be massively smeared out and unrecognizable. This may be some sort of runaway consecutive-pixels thing, but I’m not certain. That’s just a guess based on the visual results.
As a workaround, at present, there are no threshold checks made, so every color comparison requires an exact match; if not, a new rect
is created. It would be nice to restore the threshold code. If anyone wants to take a whack at it, please feel free. It may be some time before I get to the point of being able to tackle it in detail.
I have an entire font I have to export one letter at a time, it is kind of annoying to click the download SVG on each link, I would be grateful for a future to download all files I imported as a zip.
So here I am, filing an issue on my own project hoping someone can fix it…
I create a simple 'examples.php' file in the /test
directory. It reads in all five test raster images and then displays the result of the converter script. Except, three out of five are mangled in some way, and with the red box, I don’t know how we’d tell if it was mangled. Anyone know why this is happening, and how to fix it? I suspect it has to do with the horizontal/vertical comparison, but I’m honestly not sure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.