Re: Allow a PNG to begin with a #! line

Glenn Randers-Pehrson <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXctHa=QTPjM+dQHQ-mNqZqRMj-=X+vyFOh2pc=NkLSfVDg@mail.gmail.com>
A PNG file does not have "lines"; it's binary.  But you could do something
like
this, with the "#!something" followed by a base64-encoded PNG (like a "data
URL"):

$ cat blue.epng
#!/usr/local/bin/display_epng
data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEUAAP////973JksAAAA
AWJLR0QB/wIt3gAAAAd0SU1FB+ALARMzAYjwr9kAAAAMSURBVAjXY2AgDQAAADAAAceqhY4AAAAl
dEVYdGRhdGU6Y3JlYXRlADIwMTYtMTEtMDFUMTk6NTE6MDEtMDQ6MDBvJnzcAAAAJXRFWHRkYXRl
Om1vZGlmeQAyMDE2LTExLTAxVDE5OjUxOjAxLTA0OjAwHnvEYAAAAABJRU5ErkJggg==

That wouldn't require defining a PNG-2.0, the data can contain a regular
PNG as demonstrated above.  So,
an EPNG is simply a #-delimited header followed by a data URL containing
image data.

Glenn

On Tue, Nov 1, 2016 at 4:43 PM, Soni L. <[email protected]> wrote:

> EPNG was a bust, so, can PNG be changed so that a #! line at the start
> of a PNG is ignored/skipped?
>
> This breaks backwards compatibility, so might need to be delayed until a
> "PNG 2.0".
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> png-mng-misc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/png-mng-misc
>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
png-mng-misc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/png-mng-misc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.