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

"Soni L." <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <[email protected]>
In terms of binary, a #! "line" is just a "#!", followed by arbitrary 
non-\x0A bytes, followed by a single \x0A byte.

A #! is not a proper "line" in the sense that it can only exist on a 
file with "lines", a #! is simply what I described above. Ocaml uses #! 
with (binary) bytecode files, as weird as that may sound.

(Sad that I need to give up on backwards compatibility to have 
executable esolang[1] images. We do what we have to, I guess.)

[1]: Lots of image-based esolangs:
      - http://esolangs.org/wiki/Piet
      - http://esolangs.org/wiki/Brainloller
      - http://esolangs.org/wiki/Braincopter (variation of the above)
      - http://esolangs.org/wiki/Mycelium
      - etc, you get the idea.

On 01/11/16 10:01 PM, Glenn Randers-Pehrson wrote:
> 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] 
> <mailto:[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]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/png-mng-misc
>     <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

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