ScalableDots

日本語 | English

Drop image files or
click to select
Try sample images first?
Seeing is believing
SVG Settings
Preview

SVG image allows you to make beautifully scalable pixel art! Vector image for pixel art? Yes, you no longer need to know what nearest neighbour interpolation is!

What ScalableDots is

ScalableDots is a tool for converting image files such as PNG and GIF into SVG image. The conversion is done by replacing each pixel in the original image with an element in SVG and filling it with the original color. Its primary usage is to convert pixel art to SVG.

It's hard to show how amazing the pixel art is when we show it on the web without scaling. By showing the pixel art as an SVG image, it can be nicely scaled at any magnification.

Why SVG?

When scaling pixel art images, typical raster image scaling algorithms result in a blurred image, so we need to select a proper algorithm as well as proper magnification to make each pixel edge sharp. Of course, there are tools that support this, but if we want to show it at multiple magnifications, we have to prepare multiple files as needed and switch them appropriately.

SVG images, on the other hand, are in vector format, so no matter how much we scale it, it will always be shown with a sharp edge of pixels at any magnification.

Complete in browsers

The page you're looking at now is the web version of ScalableDots. Unlike many other online tools, ScalableDots does everything in the browser. There is no need for uploading files thus it is fast, and there are no security concerns.

Therefore, there is no limit to the size of the image to be processed, but the performance of the processing on the browser naturally depends on the computing resource of your machine.

Command line version

A command line version is also available for those who want to convert large images that are too heavy to process in a browser, or for those who want to convert a large number of files at once. Please consider using the command line version if necessary.

System requirement

Node.js version 18 or later is required. Please install it in advance.

How to install

To install the command line version of ScalableDots, use npm command bundled with Node.js.

To install in a specific folder
$ npm install @otchy/scalable-dots-cli
To install for the entire system
$ npm install -g @otchy/scalable-dots-cli

How to run

The scalable-dots command writes the result of the conversion to SVG to standard output when an image file is passed as an argument, so redirect it to another file and save it.

If installed in a specific folder
$ npx scalable-dots input.png > output.svg
If installed for the entire system
$ scalable-dots input.png > output.svg

Command line options

The scalable-dots command accepts the following options

Option Description Note Default
--type Type of dots SQUARE, CIRCLE, or RHOMBUS SQUARE
--size Size of dots Integer value 16
--gap Gap between dots Integer value 1
--pretty-print Enable pretty-print output Disabled
--version Show version
--help Show help
Example command
$ scalable-dots --type=CIRCLE --size=32 --gap=0 --pretty-print input.png > output.svg

Contact

ScalableDots is created, published and maintained by Otchy (personal blog). If you have any bug reports or feature requests, please let us know via Twitter.

ScalableDots is written by Otchy. Share it if you find it's valuable.