This paper presents a new method to measure the quality of compressed images. The method is based on a Human Visual System model and extracts perceptual structural information from images. This model is implemented and perceptual representations of images are built. These representations describe the structural information of images. For quality assessment, the representation of the original image, actually a reduced reference, is compared to the representation of the distorted image using similarity measures. Similarity scores have shown to be highly correlated with the quality of images produced by human observers in experiments. So the novelty of this method is that structural information is used to assess the quality. This method has been implemented in an application called "Smart Compress" (freely available on the Internet) which allows the user to compress images in JPEG format by choosing the visual quality of the output images.