Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a collection of photos taken from my digital camera. All of them were taken with the same settings (same resolution etc...). However all these pictures have different file sizes. Why is this? Could it be because of the colors or something?

share|improve this question
up vote 4 down vote accepted

JPEG and many others formats use compression algorithms to optimize the file size, which will cause it to depend on the content.

A picture with more gradients, colors and details should generate a bigger file in size than one containing simpler forms, even if both use the same resolution and compression level.

Unlike JPEG, file formats like BMP and TGA do not use compression and their size will depend only on the resolution and color depth of the pixels.

share|improve this answer

JPEG compression takes advantage of color zones, or blocks of similar information in the file. Described at the simplest possible level, if two pixels next to each other are the exact same color (or close enough that JPEG thinks the human eye can't tell), it simply maps the value of pixel2 to reference the value of pixel1, rather that storing it uniquely (at a very simple level, this is how file compression of all types works).

This is why, sometimes, when viewing (decompressing) a low-quality JPEG file, you'll get weird blocks of color that don't represent gradients well, or sometimes you'll see gradient "banding", in a picture of a sunset or something. These are called artifacts, and they're caused when a JPEG is saved with low quality settings, therefore taking a more extreme approach on size optimization.

You may have heard someone on a forum say "needs more JPEG" when someone posts a low-quality image. This has been a running joke on the internet for a while now, even leading to sites like

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .