Jpeg calculating max size

后端 未结 5 2042
灰色年华
灰色年华 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:40

    The maximum possible size a JPEG can be should be somewhere around width * height * 12 bits.

    JPEG converts images to a different color space (YCbCr) which uses fewer bits (12 to be exact) to represent a single color. Realistically speaking though, the image will be much smaller than the above formula would suggest.

    If we use lossless compression only, the file size would be a bit smaller. Even then, no one does that so your image should be far below the limit set by that formula.

    In short: 60 kb tops, but most likely way less.

提交回复
热议问题