Application of K-means Algorithm in Image Compression