Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a PNG image contain multiple pages?

Tags:

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

enter image description here

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

~~~~

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 

And here is a pastebin of the command identify -verbose algorithms-combined-print.png: http://pastebin.com/hw1yuRKa

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.

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

like image 600
William Entriken Avatar asked Dec 31 '15 21:12

William Entriken


People also ask

How do I split a PNG into multiple pages?

Open your browser in PDF free application web site and go to Splitter tool app. Click inside the file drop area to upload PNG files or drag & drop PNG files. You can upload maximum 10 files for the operation. Click on SPLIT button.

Can PNG have multiple layers?

No, a PNG does not have layers.

Can a JPEG have 2 pages?

No, JPEG does not support multi-page images.


1 Answers

PNG does not support "multipage" images.

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 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).

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)

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

like image 103
leonbloy Avatar answered Sep 20 '22 12:09

leonbloy