Skip to content

img-to-html-boxshadow is a Python script that converts every pixel from an image, to a box-shadow pixel.

Notifications You must be signed in to change notification settings

pinguluk/img-to-html-boxshadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img-to-html-boxshadow

img-to-html-boxshadow is a Python script that converts every pixel from an image, to a box-shadow pixel.

Installation

Download the imgtohtmlboxshadow.py script and install PIL

pip install pillow

Usage

imgtohtmlboxshadow.py -img IMAGE_DOT_EXTENSION -output FILENAME.html

Example

imgtohtmlboxshadow.py -img cat.jpg -output cat.html
imgtohtmlboxshadow.py -img fish.png -output fish.html

Preview

Cat Fish

TODO

  • Convert rgba(r, g, b, a) to hex value, to reduce the file size
  • Improve the width (and height) of a pixel, when the adjacent pixels are the same, in order to remove repetitive pixels and improve file size

Checkout the other method I've made, using HTML elements

img-to-html

About

img-to-html-boxshadow is a Python script that converts every pixel from an image, to a box-shadow pixel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages