Re: EXIF support in PNG

Glenn Randers-Pehrson <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXcu7L3UZ-J9i470j5haNpb9rR3jYHG-vk3iYc5rH-k0s4g@mail.gmail.com>
On Thu, Jan 5, 2017 at 12:32 PM, John Bowler <
[email protected]> wrote:

> On Thu, Jan 5, 2017 at 7:09 AM, Glenn Randers-Pehrson <[email protected]>
> wrote:
> > glenn.rp> cat dunflate.f
>
> Ok.  There's something I don't understand about this FORTRAN.  You
> seem to be trying to write 65540 data blocks, each containing 65535
> bytes of the original EXIF data, but there is no explicit FOR loop.
>

It's only in my mind right now but of course there will be a DO loop or two.


>
> Now I've used langauges with implicit loops (LISP MAPCAR style) and,
> indeed, I've designed such languages.  Are you saying that the
> followng FORTRAN iterates over the input (EXIF) data to construct
> "blocks"?
>
> c     if (not last block i.e., remaining_length > 64k-1)
> c         block header:
> c           128 (1, 00, xxxxx) [check on position of the "1"]
> * * *
> c         some data
>           remaining_data -= 64k-1
> c     else
> c         block header:
> c           0 (0, 00, xxxxx)
> * * *
> c         remaining data
>
> Because later you use the data object "blocks":
>
> c     calculate length and crc32 over
> c         "iCCP", zero, cmf, blocks, and adler32
> * * *
> c     write blocks
> c     write ADLER32
>
> Sorry, it's just unclear to me.  Even if it is implicit I think there
> has to be a FOR loop and an intermediate buffer allocation somewhere.
>

Of course there will be a DO loop to iterate over the input bytes.

You wanted to see the code before the auditors were done with it,
so there it is.

Glenn

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

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