Re: EXIF support in PNG

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U39_1GK+Bam2pL0f4x4RWVazvdHb4dVC-eWcGEGd_KpWGjA@mail.gmail.com>
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.

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.

-- 
John Bowler <[email protected]>
+1 (541) 450-9885
PO BOX 3151
KERBY OR 97531-3151
USA

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
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.