Re: Allow a PNG to begin with a #! line
Andreas Kleinert <[email protected]>
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Message-ID | <[email protected]> |
I have to admit that I do not like the approach very much. When indexing a large number of files, e.g. for thumbnail creation, for speed reasons typically you would not scan the whole file (or even first 1024 bytes or so) for a known signature. Instead one would check for a known magic file header at fixed position, maybe in combination with something else (file extension, some validity checks elsewhere). How does Windows thumbnail preview deal with such? Von meinem iPhone gesendet > Am 02.11.2016 um 01:01 schrieb Glenn Randers-Pehrson <[email protected]>: > > 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 ------------------------------------------------------------------------------ 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