Skip to content

image-compressor is a program written in Haskell to compress the colors in an image. To do so it uses my own implementation of the clustering algorithm K-Means.

Notifications You must be signed in to change notification settings

Zuldruck/image-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image-compressor

What is it ?

image-compressor is a program written in Haskell to compress the colors in an image.

To do so it uses my own implementation of the clustering algorithm K-Means.

Example

A landscape with in order : no compression, 2, 4, and 8 clusters of compression.

A fox logo with in order : no compression, 2, 4, and 8 clusters of compression.

How to run it ?

stack build
stack exec ImageCompressor-exe -n cluster_nb -f file_path

File Format

Files passed to the program must be formatted following this grammar :

IN    ::= POINT ' ' COLOR ('\n' POINT ' ' COLOR)*
POINT ::= '('int','int')'
COLOR ::= '('SHORT','SHORT','SHORT')'
SHORT ::= '0'..'255'

About

image-compressor is a program written in Haskell to compress the colors in an image. To do so it uses my own implementation of the clustering algorithm K-Means.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published