1. How many pictures calculator
- Posted by gaz May 08, 2009
- 1115 views
How do you work out how many pictures there are for a given number of pixels and colours?
The image dimensions are 1 Bit Per Pixel = 2 colours 4*4 number of pixels = 16 pixels
I think the answer is 2^16 = 65536 2 to power of 16 is 65536 Is this the correct answer?
2. Re: How many pictures calculator
- Posted by gaz May 08, 2009
- 1109 views
Here is the code I’m using to produce all the pictures
include misc.e include get.e constant NUMOFBITS=16 constant START=0 constant TARGET=1 sequence bits bits=repeat(0,NUMOFBITS) integer fn fn=open("data.txt","w") integer pos1 pos1=NUMOFBITS sequence result result=repeat(TARGET,NUMOFBITS) while 1 do puts(fn,sprint(bits)&"\n") if equal(bits,result) then exit end if bits[pos1]+=1 if bits[pos1]>TARGET then bits[pos1]=START pos1-=1 for i=pos1 to 1 by -1 do bits[i]+=1 if bits[i]>TARGET then bits[i]=START else pos1=NUMOFBITS exit end if end for end if end while close(fn)
3. Re: How many pictures calculator
- Posted by DerekParnell (admin) May 08, 2009
- 1089 views
How do you work out how many pictures there are for a given number of pixels and colours?
The image dimensions are 1 Bit Per Pixel = 2 colours 4*4 number of pixels = 16 pixels
I think the answer is 2^16 = 65536 2 to power of 16 is 65536 Is this the correct answer?
I think you are trying to find out ... given P pixels, and each pixel can have C different colours, how many different images can you get?
Well, let's look at the simplest case: P = 1, C = 2 => 2 images. Now when P = 2, we get 2 * 2 = 4 images, when P = 3 we get 2 * 4 = 8 images, etc ...
Graphically ...
P = 1
0 1P = 2
00 01 10 11P = 3
000 001 010 011 100 101 110 111
Mathemtically ... P = 1 => C, P = 2 => C * C, P = 3 => C * C * C
So in the general case, the number of images is C multiplied by itself P times, which is C raised to the power P.
I = power(C,P)
In your example data ...
I = power(2,16)
Gives us the answer 65536.
So if we had an 8 by 8 pixel image (64 pixels per image) and each pixel can have 8 bits each of Red, Green and Blue for a total of 16777216 different colours, we can have about ... 2.4e+462 images (that's 24 followed by 461 zeros).
5. Re: How many pictures calculator
- Posted by euphoric (admin) May 08, 2009
- 1145 views
So if we had an 8 by 8 pixel image (64 pixels per image) and each pixel can have 8 bits each of Red, Green and Blue for a total of 16777216 different colours, we can have about ... 2.4e+462 images (that's 24 followed by 461 zeros).
And there are only 10^80 atoms in the observable universe. Wow!

