An algorithm to improve block truncation coding for image compression is proposed. Images to be compressed are first differentiated and edge information is extracted by investigation of the histogram of small nonoverlapping blocks of the differential image. The image is classified into visually active and visually continuous blocks which are then coded individually.