Skip to content

DavideGalilei/image2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image to html banner image
Use black magic to convert an image to html

image2html

This is a tool to convert any image to html tables (beware using it for large images). Made with Nim 👑

Example

example image

Installation

$ nimble install https://github.com/DavideGalilei/image2html

Installation (library-usage only)

$ nimble install -d:noBinary https://github.com/DavideGalilei/image2html

Usage

$ image2html file.jpg output.html

Or as a library...

import pkg/image2html, pixie

let html = convertToHtml(readImage("path/to/example.png"))
writeFile("path/to/output.html", html)

FAQ

How does this work?

This project uses pixie library to extract pixels from images. Then it converts them to <th> html tags with a background-color style property

Why did you make this?

I was bored

Is this useless then?

Yes, it is

License

Licensed under the MIT License. Click here for further information.