Skip to content

justinledford/k-means-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kmc-ic

Compress .rgb (pixmap) image files using k-means clustering

Usage

compress: ./compress -c <k> <w> <h> <tile_w> <tile_h > <input> <output>
decompress: ./compress -d <input> <output>

Note: k should be a power of 2


ImageMagick can be used to convert to and from .rgb files:

convert image.jpeg image.rgb
convert -size <w x h> -depth 8 image.rgb image.jpeg

Example

Original Compressed (k = 128, 2x2 tiles)
768K pixmap .rgb 66K compressed

Images have been converted to JPEG to display here

About

Image Compression using K-Means Clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published