Recent research in image compression has focused on lossy compression algorithms. However, the baseline implementations of such algorithms generally use a universal quantization process that results in poor image quality for certain types of images, particularly mixed-content images. This paper addresses this image quality issue by presenting a new algorithm that provides flexible and customizable image quality preservation by introducing an adaptive thresholding and quantization process based on content information such as edge and texture characteristics from the actual image. The algorithm is designed to improve visual quality based on the human vision system. Experimental results from the compression of various test images show noticeable improvements both quantitatively and qualitatively relative to baseline implementations as well as other adaptive techniques.