iPhone Flavor of PNG format

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

User avatar
maadjordan
Posts: 25
Joined: Thu Oct 30, 2003 8:33 pm

iPhone Flavor of PNG format

Post by maadjordan »

Dear Pierre,

I've come into an iphone app which is just a plain zip file. I've extracted the content tried to view images with no success then i found this link (http://www.modmyi.com/wiki/index.php/Iphone_PNG_images) which shows that Apple as altered PNG format. The link also propose a way to decode and some tools but i prefer XnView as always :mrgreen:
XnView Arabic Support
User avatar
xnview
Author of XnView
Posts: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Iphone Flavor of PNG format

Post by xnview »

Could you send me some samples?
Pierre.
obelisk
Posts: 464
Joined: Fri Jan 09, 2009 9:54 am

Re: Iphone Flavor of PNG format

Post by obelisk »

we really shouldn't support people who break formats.
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: Iphone Flavor of PNG format

Post by MaxSt »

Yeah, lets implement normal PNG completely (some features are still missing), before supporting this abomination.
User avatar
xnview
Author of XnView
Posts: 43444
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Iphone Flavor of PNG format

Post by xnview »

which features?
Pierre.
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: iPhone Flavor of PNG format

Post by MaxSt »

1. Colormode 4 = "greyscale with alpha"

2. Some APNG examples: http://animatedpng.com/index.php/news/f ... g-samples/
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: Iphone Flavor of PNG format

Post by DOS386 »

obelisk wrote:we really shouldn't support people who break formats.
Right. If they want a new format, they should:

1. Make sure that it's sufficiently superior to existing formats, otherwise there is no point to invent it (similar applies to other "new" stuff like video codecs)

2. Give it a new name sufficiently different from existing format names

So, don't suport this at all, or support it, but only after some "enable broken formats" hack has been activated and a thick warning thrown. XNVIEW should NOT pretend such "PNG"'s would be fine (and other viewers broken).

PNG is a well specifed format and should remain that way.
2. Some APNG examples:
APNG is NOT PNG. APNG has been rejected by the PNG developers, as it also breaks the PNG spec (maybe slightly less aggresively than this iphone hack ???).
Colormode 4 = "greyscale with alpha"
Examples please :-)
There is indeed no WinZIP under my rock.
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: iPhone Flavor of PNG format

Post by JohnFredC »

XnView (and all other image viewers) should be format-neutral to the extent it is reasonable/possible. Image viewers, after all, serve the user purpose of viewing image files, NOT some vague philosophical industry (or special interest) goal of suppressing the proliferation of obscure image formats (no matter how desirable it may be for the industry at large - and the user population in particular - to attempt that).

Any image viewer that refuses to read a format for such reasons acts to "cut off its own nose to spite its own face". The users will simply look elsewhere.

The iPhone is enormously popular. Silly not to support image formats that it supports, bastardized or not.

Just my 2 pfennigs.
John
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Re: iPhone Flavor of PNG format

Post by Clo »

:arrow: JohnFredC

:) Hello John !
…Any image viewer that refuses to read a format for such reasons acts to "cut off its own nose to spite its own face". The users will simply look elsewhere. …
• I agree. Prior, XnView must perform the jobs it's designed for,
then feel free to yell at the formats breakers as much as you want ! :P

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: iPhone Flavor of PNG format

Post by helmut »

JohnFredC wrote:...
The iPhone is enormously popular. Silly not to support image formats that it supports, bastardized or not.
+1
(Given that performance of PNG reading is not affected, Apple "PNG" format should also be supported).
JohnFredC wrote:Just my 2 pfennigs.
In Germany, we have euros and cents, now. ;-)
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: iPhone Flavor of PNG format

Post by MaxSt »

JohnFredC wrote:The iPhone is enormously popular. Silly not to support image formats that it supports, bastardized or not.
Let's support regular PNG fully first.
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: Iphone Flavor of PNG format

Post by MaxSt »

DOS386 wrote:APNG is NOT PNG. It also breaks the PNG spec
No it's not. PNG specs allows third-party chunks extensions. If a third-party follows those chunk-naming rules, you cannot accuse them of breaking anything.
DOS386 wrote:APNG has been rejected by the PNG developers
Not unanimously. Some PNG developers love it.

Your outrage is misplaced anyway, as XnView is the only image viewer that supports APNG. It's a big selling point against competitors.
DOS386 wrote:Examples please :-)
http://newsgroup.xnview.com/viewtopic.p ... 74&start=0
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: iPhone Flavor of PNG format

Post by XnTriq »

MaxSt wrote:Yeah, lets implement normal PNG completely (some features are still missing), before supporting this abomination.
I fully support your request for full support ;-)

According to what I've been reading on the interwebs, ...
Borko Furht ([url=http://books.google.com/books?id=Ipk5x-c_xNIC&lpg=PR1&ots=ovOkuhRiXL&dq=%22Encyclopedia%20of%20Multimedia%22&pg=PR1#v=onepage&q&f=false]Encyclopedia of Multimedia[/url] » Page 729) wrote:Chunk types can come from three main sources: the PNG standard, registered public chunk types maintained by the PNG Development Group, and private chunks, defined by some applications. This chunk-based structure is designed to allow the PNG format to be extended while maintaining compatibility with older versions.
... ancillary custom chunks (as used for Math PNG, Worms, ZDoom etc.) come in two flavors:
  1. Public chunks (= registered = standardized)
  2. Private chunks (= unregistered = non-standardized)
Jonathan Branam (Dr.Dobb's: [url=http://www.drdobbs.com/mobility/224400563?pgno=2]Developing for the iPad[/url] » Save Fast and Save Often) wrote:The concept of continuous, incremental saving is crucial to the operation of every iPhone OS application. Users on the phone may be interrupted at any time to receive a call and may decide to exit your application at any time. Apple frowns on applications that offer an explicit Save or Load button, instead encouraging developers to save while the user works. For Ideate, I designed a custom file format based on the PNG image file format. The PNG format supports custom chunks in the file which can contain any data that an application required. Adobe Fireworks uses this approach to store all of its metadata in a PNG file and I thought it was a good idea. This means that browsers, image editors, and mail clients can all render an Ideate image, but only the Ideate app itself will load and save the custom chunks of data inside the file.
XnTriq ([url=http://newsgroup.xnview.com/viewtopic.php?p=65771#p65771]Common graphic formats[/url]) wrote:
libpng.org ([url=http://www.libpng.org/pub/png/pngintro.html]A Basic Introduction to PNG Features[/url]) wrote:Like GIF and TIFF, PNG is a raster format, which is to say, it represents an image as a two-dimensional array of colored dots (pixels). PNG is explicitly not a vector format, i.e., one that can store shapes (lines, boxes, ellipses, etc.) and be scaled arbitrarily without any loss of quality (generally speaking). For that you probably want SVG or PostScript. (There are some private extensions to PNG that add vector information in addition to PNG's regular pixels — Macromedia's Fireworks does something along those lines — but no valid PNG may omit the pixel data.)
Private chunks” in Fireworks PNG files: prVW, mkBF, mkBS, mkBT, mkTS.
Wikipedia (Portable Network Graphics » [url=http://en.wikipedia.org/wiki/Portable_Network_Graphics#Software_support]Software support[/url]) wrote:Adobe Fireworks (formerly by Macromedia) uses PNG as its native file format, allowing other image editors and preview utilities to view the flattened image. However, Fireworks by default also stores meta data for layers, animation, vector data, text and effects. Such files should not be distributed directly. Fireworks can instead export the image as an optimized PNG without the extra meta data for use on web pages, etc.
User avatar
DOS386
Posts: 291
Joined: Sun Jun 11, 2006 2:43 pm

Re: Iphone Flavor of PNG format

Post by DOS386 »

MaxSt wrote:
DOS386 wrote:APNG is NOT PNG. It also breaks the PNG spec
No it's not. PNG specs allows third-party chunks extensions. If a third-party follows those chunk-naming rules, you cannot accuse them of breaking anything.
They tried to do it "legally and smoothly" but still APNG breaks the purpose of PNG "to store a single static image".
DOS386 wrote:APNG has been rejected by the PNG developers
Not unanimously. Some PNG developers love it.
Right, but the majority said NO.
Your outrage is misplaced anyway, as XnView is the only image viewer that supports APNG. It's a big selling point against competitors.
There is no "outrage". I didn't ask for removing APNG support. Just pointing that it's a controversial enhancement, and PNG support can be complete without APNG support. BTW, the APNG frame decomposition is still broken in NC/XN.
Good :-)

> The iPhone is enormously popular. Silly not to support image
> formats that it supports, bastardized or not.

Ask apple to fix his iPhone ?

> (Given that performance of PNG reading is not affected,
> Apple "PNG" format should also be supported).

It doesn't affect the performance, just ruins a clean standard. One day people might consider the Apple "PNG" as "standard" and the original PNG as "broken". Again, I suggest adding a <enable support for broken Apple "PNG" files> option (off by default) and a warning into the history: <added support for broken Apple "PNG" files, must be enabled before using, note that those files are NOT valid PNG>.
There is indeed no WinZIP under my rock.
MaxSt
Posts: 133
Joined: Fri Apr 10, 2009 9:55 pm

Re: Iphone Flavor of PNG format

Post by MaxSt »

DOS386 wrote:They tried to do it "legally and smoothly" but still APNG breaks the purpose of PNG "to store a single static image".
It could be their wish, but they forgot to make specific rules about what kind of information is forbidden in third-party chunks. Without such rules, I could embed mp3 inside, if I want to. With album artwork inside that mp3. Oh wait, that's another image... but who cares, really?

They accepted sTER chunk, by the way (stereo pair: one for left eye, one for right eye).
DOS386 wrote:Right, but the majority said NO.
Right, but if it's clearly broken, it would be unanimous no.
It's all irrelevant anyway, because their votes will not stop people from using APNG.
Post Reply