File format limits in pixel size for png images?

后端 未结 2 1815
时光说笑
时光说笑 2021-01-11 14:10

Is there a file format limit to the PNG pixel size?

I am trying to visualize a 30.000x30.000 pixels PNG image with Firefox, but I get an error. The image opens corr

2条回答
  •  臣服心动
    2021-01-11 14:49

    A naive implementation of resizing would require the image to be blown up to 2.7GB in size before it is displayed. This would clearly be too large for a normal 32-bit program to handle.

    The PNG specification doesn't appear to place any limits on the width and height of an image; these are 4 byte unsigned integers, which could be up to 4294967295. http://www.libpng.org/pub/png/spec/iso/index-object.html#11IHDR

提交回复
热议问题