How many images can be produced by all permutations of 24-bit 640x480 JPEG? Is this is the maximum number of images on 24 bit 640x480 frame and we can not have more images?

  • Is this homework? – frabjous Jan 18 '11 at 4:17
  • No it is not home work. I had a discussion with one of my friend.The concern is that is the number of images limited on a particular scale. I think no. – Any Jan 18 '11 at 4:25


2 choices per bit

24 bits

640 times 480 pixels

^ is exponent

~~ edit to reply to comments~~

Yes, this is the maximum number of images.

Yes, compression would decrease this number.

More basic example, to clarify:

Let's calculate how many images can be 1x2 using 2 bit color.

In 2 bit color, each pixel must be one of 4 colors. In my imaginary world, here, the choices are Black, White, Green and Yellow: BWGY

So, for pixel 1,1, there are 4 choices. And for pixel 1,2, there are four choices. So here are all the possible pictures:


You can calculate this by (number of choices) raised to the (number of pixels), so in this case 4^2 = 16.

Let's say we wanted to increase the width of this picture (by making it a 1x3 image. ooh: widescreen!). For each of the original 16 pictures, you can make 4 new pictures, one for each of the color choices. So now, you have 64 pictures. Which still fits our formula: (choices)^(pixels) 4^3 = 64.

Another note: if you are dealing with x bits, the number of color choices will always be 2^x

  • Kindly answer the second question – Any Jan 18 '11 at 3:39
  • 3
    I think he did answer your second question. You asked for the number of images by all permutations, which implies maximum in and of itself. – user3463 Jan 18 '11 at 6:14
  • What if the object changes, texture, lightning etc changes... – Any Jan 18 '11 at 6:30
  • 2
    While this is clearly the answer for a bitmap image of the given requirements, I suspect JPEG's lossy compression effectively reduces this value. – DMA57361 Jan 18 '11 at 12:37
  • 2
    If anyone is interested, this value works out to 8.9542950495824726607075904256630349841435477985541... × 10^2219433 ( Wolfram Alpha ). Otherwise known as "quite a lot". – DMA57361 Jan 18 '11 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.