本文介绍了PNG图像可以包含多个页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OSX上,我将多页PDF文件转换为PNG,并(以某种方式)创建了多页PNG文件.

On OSX I converted a multi-page PDF file to PNG and (somehow) it created a multi-page PNG file.

PNG格式是否有扩展名允许?还是这不是我可以有效创建的东西?

Is there an extension to the PNG format that allows this? Or is this not something I can validly create?

~~~~

为澄清起见,根据imagemagick的内置 file 命令和 identify 命令,这是一个PNG文件.

To clarify, this is a PNG file, per the builtin file command and the identify command from imagemagick.

$ file algorithms-combined-print.png
algorithms-combined-print.png: PNG image data, 1275 x 1650, 8-bit/color RGBA, non-interlaced

$ identify algorithms-combined-print.png
algorithms-combined-print.png PNG 1275x1650 1275x1650+0+0 8-bit sRGB 3.537MB 0.000u 0:00.000

这是命令 identify -verbose algorithm-combined-print.png 的粘贴框:http://pastebin.com/hw1yuRKa

该输出值得注意的是像素数为 Number pixel:2.104M ,对应于一页.但是,文件大小为3.537MB,显然足以容纳所有页面.

What is notable from that output is that the pixel count is Number pixels: 2.104M which corresponds to one page. However, the file size is 3.537MB, which is clearly sufficient to hold all the pages.

每个请求,这是 pngcheck 的输出: http://pastebin.com/aCRMEd9L

Per request, here is the output of pngcheck: http://pastebin.com/aCRMEd9L

推荐答案

PNG 不支持多页"图片.

PNG does not support "multipage" images.

MNG 是一种PNG变体,它支持多个图像-主要用于动画,但是不是真正的PNG图片(不同的签名/标题),并且从未流行.

MNG is a PNG variant that supports multiple images - mostly for animations, but it's not a real PNG image (diffent signature/header), and has never become popular.

APNG 是一种类似的尝试,但更多地专注于动画-它更加流行和活跃,尽管它不太正式-它也与PNG兼容(标准的PNG查看器,不知道APNG,将其显示为单个PNG图像).

APNG is a similar attempt, but more focused on animations - it's more popular and alive, though it's less official - it's also PNG compatible (a standard PNG viewer, unaware of APNG, will display it as a single PNG image).

另一种可能的解释是,您的图片实际上是TIFF图片,扩展名错误的 .png ,并且查看者将其忽略.

Another possible explanation is that your image is actually a TIFF image with a wrong .png extension, and the viewer ignores it.

唯一可以确定的方法是查看图像文件本身(至少到第一个字节)

The only way to know for sure is to look inside the image file itself (at least to the first bytes)

更新:鉴于pngcheck输出,它似乎是一个APNG文件.

Update: given the pngcheck output, it seems to be a APNG file.

这篇关于PNG图像可以包含多个页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 05:47