title: How to calculate Image compression ratio?
body: <p>How do I calculate the following : Suppose we want to compress tiny images that are 10x10 pixels and each pixel is represented by four bytes (for Red, Green, Blue and transparency).</p>
  
  <p>Suppose a codebook (centroids of K-Means) of size 1000 provides acceptable distortion.</p>
  
  <p>Assuming that each image is compressed separately, and ignoring the encoding of the codebook, what is the compression ratio (uncompressed bit / compressed bits)?</p>