png图像像素大小的文件格式限制? [英] File format limits in pixel size for png images?

查看:1004
本文介绍了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

这篇关于png图像像素大小的文件格式限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆