Results 1 to 4 of 4

Math Help - Total number of possible JPEG's

  1. #1
    Newbie
    Joined
    Jun 2011
    Posts
    2

    Total number of possible JPEG's

    Hi, I'm trying to compute the total number of possible JPEG's that could be created.
    JPEGs can be anywhere from 1x1 to 65535x65535 pixels and each pixel has 8bit color x three color channels. This means there is 256x256x256=16777216 possibilities for each pixel.
    I'm an amateur at mathematics, but so far what I have come up with is:

    (256^3)^(sum_(x=0)^65535(x+sum_(y=0)^65535y))

    I figured I had to sum the maximum width of the jpeg (65535) added to the summation of the maximum height (also 65535) to get the total number of possible sizes. Then I would have to use that total (the total amount of possible pixel spaces) as an exponent on the number of possible colors right?

    Any help would be greatly appreciated (in solving the equation, verifying it, or correcting it)!
    Thanks!

    -John G. Hampton
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    May 2010
    Posts
    1,027
    Thanks
    28

    Re: Total number of possible JPEG's

    its probable easiest to build up to this. Suppose i fix the dimensions at x and y. Lets find the number of x \times y JPEGs that can be made.

    There are xy pixels, and each one can take 256^3 values. So the number is \left(256^3 \right)^{xy} = 256^{3xy}

    Step 2
    Now lets vary one of the dimensions (x), while pretending the other(y) is fixed at some value. We can just add up our formula for all the possible values of x

    Combinations if height is fixed at y :  \sum_{x=1}^{65535} 256^{xy}

    Step 3
    Now lets vary the other dimension. We can just add up the previous formula for all the possible values of y.

     \sum_{y=1}^{65535} \left( \sum_{x=1}^{65535} 256^{3xy} \right)
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2011
    Posts
    4

    Re: Total number of possible JPEG's

    Those calculations are right for bitmap/raw pictures. But then JPEG uses the DCT to achieve lossy compression, so all possible quantization matrix values combinations affecting the DCT should be taken into account too, shouldn't it? Effectively counting each smallest possible compression factor variation affecting high and low frequencies of the image as the generator of a unique variation of source image to be counted as if it was a new image. Or not?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jun 2011
    Posts
    2

    Re: Total number of possible JPEG's

    Thanks for the replies!
    You bring up a good point Chojin. You're right, this is just a calculation for a bitmap of each possible jpeg image, but I think I can get away with this because this calculation is to figure out how many variations on the JPEG could be printed (assuming uniformity in the printing processes). It should cover all possible artifacting from various levels of compression—at least visually.

    Now if only I could solve it! It's far too large for wolfram-alpha which is my usual calculator.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Total number of codes generated from 8 bit blocks
    Posted in the Number Theory Forum
    Replies: 5
    Last Post: October 14th 2011, 02:22 PM
  2. Replies: 0
    Last Post: July 11th 2010, 05:18 AM
  3. Replies: 1
    Last Post: February 20th 2009, 10:35 AM
  4. Total Number of Points
    Posted in the Pre-Calculus Forum
    Replies: 9
    Last Post: October 17th 2008, 01:37 PM
  5. total number of combinations
    Posted in the Statistics Forum
    Replies: 3
    Last Post: September 11th 2007, 04:49 PM

Search Tags


/mathhelpforum @mathhelpforum