Jpeg calculating max size

后端 未结 5 2043
灰色年华
灰色年华 2021-02-08 00:19

I have to say the I don\'t know much about how file formats work. My question is say I have a jpeg file that is 200 px by 200 px, how can one calculate what the maximum size th

5条回答
  •  名媛妹妹
    2021-02-08 00:57

    The final size in bytes is based on the encoding quality settings used and the number of pixels. In your case, all images should be the same size since you are doing the encoding and your user seems forced to draw on a 200x200 area.

    According to wikipedia though, the maximum is roughly 9 bits per a pixel.

    So 200*200*9 = 360000 bits = 45 kB

    http://en.wikipedia.org/wiki/JPEG#Effects_of_JPEG_compression

提交回复
热议问题