Skip to content

This replicates images in pure HTML by creating tables of pixel-sized cells.

Notifications You must be signed in to change notification settings

discountgenius/pixeltable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

pixeltable

pixeltable is a python script that takes an image file and encodes it as an HTML table of one-pixel-sized cells. Each individual cell has a bgcolor attribute that replicates the color of the corresponding pixel.

Usage

python pixeltable.py [path]/[name].jpg will create [path]/[name].html; a properly formatted HTML file that replicates the image with CSS and an HTML table. This should only be used for small images (100x100 at the biggest).

File size results from initial tests

image width image height .JPG file size .HTML file size minified .HTML file size
50 pixels 20 pixels 1.39 KB 34 KB 26.8 KB
100 pixels 40 pixels 3.1 KB 134 KB 106 KB
400 pixels 245 pixels 59 KB 3.18 MB 2.52 MB

Made by John Atkinson
http://discountgeni.us
@discountgenius

About

This replicates images in pure HTML by creating tables of pixel-sized cells.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages