Jump to main content

Image Compression vs. Image Quality: Finding the Best Tradeoff

25 reviews


In this project you'll learn about how digital image files are encoded, and how digital images can be compressed so that the files take up less storage space and can be transmitted more quickly. You will also measure the quality of compressed and uncompressed images, which will give you important insights into the tradeoffs between file size and image quality.


Areas of Science
Time Required
Short (2-5 days)
Good computer skills; Project costs lower depending on printing method and number of images printed.
Material Availability
Readily available
Very Low (under $20)
No issues
Andrew Olson, Ph.D., Science Buddies


The objective of this project is to compare at least two different image compression algorithms and rate them for:


What's so important about image compression algorithms? With today's computers, DVDs and digital cameras, digital images are everywhere. For example, on websites images are used for advertising, and as illustrations and diagrams for articles. Image files can easily be huge (more on this later). Image compression is essential for DVDs and speedy downloading of webpages over a network connection.

What makes image files so big? Digital images such as photographs are generally encoded as rows and columns of pixels (from picture elements). This type of image format is called a raster image. The more pixels in each row and column, the better the resolution of the image. For example, an image that is 1280 pixels wide by 1024 pixels has better resolution than an image that is 640 pixels wide by 512 pixels tall. It will appear smoother, less "pixellated". But the higher resolution comes at the cost of four times as many pixels. In addition to spatial resolution, there is also the problem of color encoding. An image with 24 bits of color information for each pixel will generally look better than an image with only 16 bits of color information for each pixel. Again, the better the color resolution, the bigger the image file.

In order to make the most efficient use of images, it is important to match the spatial and color resolution of the image to the spatial and color resolution of the intended output device. For example, a typical computer screen has a spatial resolution of about 75 pixels per inch (also referred to as dots per inch or "dpi"), and color resolution of 24 bits per pixel. Printers, on the other hand, have much higher spatial resolution, anywhere from 300 dpi to as much as 9600 dpi horizontally by 2400 dpi vertically. Obviously, a high-quality printed image is going to be a lot bigger than the same size image displayed on a computer screen.

Image compression algorithms are designed to minimize image file size in order to speed up image data transmission. There are "lossless" algorithms, which have the property that all of the original information in the image can be recreated from the compressed image, and there are "lossy" algorithms, which sacrifice some of the original image information in order to compress the image further.

How much can an image be compressed with a "lossy" algorithm before you start to notice a difference in image quality? Do some types of images lose image quality more quickly than others? This project will help you to answer these questions, and more.

Terms and Concepts

To do an experiment in image compression, you should do research that enables you to understand the following terms and concepts:



Materials and Equipment

Experimental Procedure

  1. Do your background research, and test your knowledge by explaining the terms and concepts, and answering the questions in the section above.
  2. Select a set of images for your experiment.
    • From your background research, you should be able to form a hypothesis about which types of images will work best with each compression algorithm you test. Try to select images for both best- and worst-case for each algorithm.
    • If you take your own digital photographs, you will not have to worry about copyright issues.
    • If you download images from the Web, make sure that you have permission to use the image from the copyright holder (if any).
  3. Learn how to use your image-writing program to save images in compressed format.
    • Read about the different options in your program's help file.
    • Select "low", "medium" and "high" image quality compression settings for each algorithm you are using.
  4. Use your image-writing program to save each image with the "low", "medium", and "high" image quality settings you selected for each compression algorithm. Name each file so that you can tell which settings and algorithm were used to create it, and which original image it came from.
  5. Have your assistant help you to print the images, labeling them on the back with a coded name. Your assistant should be able to match the coded names to the original ones, but you should not know the code. All of the images should be printed with the same paper type, printer and printer settings.
  6. Study the images, and arrange them in order of image quality from best to worst. Then assign a "quality score" to the images, for example, on a scale of 1-10. If two or more images appear indistinguishable, rank them equally. Take notes on what features you used to rank the images as you did. (This is called a "blind" test, because you do not know which algorithm and settings produced which image.)
  7. After all of the images have been rated, have your assistant reveal the codes. Now you can add the compression information to your ratings, and make comparisons.
  8. Compare the trade-offs in file size vs. image quality for different image types. For example, you might want to make a graph of compression ratio vs. your image quality ranking. Can you draw any conclusions about when image compression is worthwhile and when it is not? Or how much compression is acceptable for a particular purpose (say, sending a photo album of your summer vacation to your cousin by email).
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.


  • Use a resolution target as one of your test images. For example, here is a US Air Force bar target. The bars are arranged in groups of six (three horizontal and three vertical) at progressively smaller sizes. Make a set of images with "low", "medium" and "high" compression settings. Print the images exactly the same way (same size, printer resolution, paper, etc.) Study the image print-outs with a magnifying glass to see the smallest set of features you can distinguish, and compare this to the compression ratio. Click to download high-resolution image:
    A bar target image shows groups of three black bars of differing sizes
  • If you print out your images at "thumbnail" size, is a higher compression ratio more or less noticeable than when the image is printed at normal size? Why? How does this compare to images intended for viewing on the computer screen vs. images intended for printing?
  • "zip" files: another common file compression method is the "zip" file, a lossless compression method. Can compressed image files be further compressed by "zipping" them?


If you like this project, you might enjoy exploring these related careers:

Career Profile
Software quality assurance engineers and testers oversee the quality of a piece of software's development over its entire life cycle. Their goal is to see to it that the final product meets the customer's requirements and expectations in both performance and value. During the software life cycle, they verify (officially state) that it is possible for the software to accomplish certain tasks. They detect problems that exist in the process of developing the software, or in the product itself.… Read more
Career Profile
Are you interested in how a website is set up and how the website runs? As a web developer and designer you could design a website's look and feel and create the code to make sure the website works. You could set up a website for your favorite store with payment options, making sure it works with the ever growing list of browsers and devices. Do you like working behind the scenes? You could design the layout or write the supporting code for an app or website while collaborating with other web… Read more

News Feed on This Topic

, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Science Buddies Staff. "Image Compression vs. Image Quality: Finding the Best Tradeoff." Science Buddies, 14 July 2023, https://www.sciencebuddies.org/science-fair-projects/project-ideas/CompSci_p006/computer-science/image-compression-versus-image-quality. Accessed 22 Sep. 2023.

APA Style

Science Buddies Staff. (2023, July 14). Image Compression vs. Image Quality: Finding the Best Tradeoff. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/CompSci_p006/computer-science/image-compression-versus-image-quality

Last edit date: 2023-07-14
Free science fair projects.