png图像像素大小的文件格式限制?

png图像像素大小的文件格式限制?

问题描述:

PNG像素大小是否有文件格式限制?

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

我正在尝试使用Firefox可视化30.000x30.000像素的PNG图像,但出现错误.图像在Preview.app中正确打开,但速度很慢.文件大小不大,大约3 MiB(1位黑白图像).我想知道是否有技术上的文件格式原因.

I am trying to visualize a 30.000x30.000 pixels PNG image with Firefox, but I get an error. The image opens correcly in Preview.app, although very slowly. The file size is not big, just around 3 MiB (1 bit black/white image). I am wondering if there's a technical file-format reason for this.

天真的调整大小实现要求在显示图像之前将其最大容量扩展到2.7GB.对于普通的32位程序来说,这显然太大了.

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.

PNG规范似乎对图像的宽度和高度没有任何限制;这些是4个字节的无符号整数,最大为4294967295. http://www.libpng.org/pub/png/spec/iso/index-object.html#11IHDR

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