dorkhub

img2css

Convert any image to pure CSS. Recreates images using only box-shadows.

javierbyte
JavaScript2.5k187 forksBSD-3-Clauseupdated 12 months ago
visit the demogit clone https://github.com/javierbyte/img2css.gitjavierbyte/img2css

img2css

Convert any image to pure CSS.

img2css

How does it work?

It has two different outputs, pure css shadow matrix [1] and base64 embedded image [2].

  • Pure CSS: This output was created by resizing and setting each pixel as a box-shadow of a single pixel div, so no img tag or background-image is needed. This can result in huge outputs, and the use of this output is not recommended for production unless there is no other option.
  • Base64: The entire image file is embedded inside the <img> tag using base64, so no need external hosting is needed.

Development

Run development server:

npm run dev

Build

npm run build

more like this

TachiSnap

TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…

HTML50

meine

meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…

Python50

search

search projects, people, and tags