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.
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.
stack build
stack exec ImageCompressor-exe -n cluster_nb -f file_path
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'