Re: EXIF support in PNG

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U399i7kPgpd+0gOv6iiw-554pWtoWXy1b0x7U_9mcdPwrcg@mail.gmail.com>
On Mon, Jan 2, 2017 at 9:51 PM, Cosmin Truta <[email protected]> wrote:

> It's deflateInit(), then deflate(), then deflateEnd().


I know those are the names of the three functions you are talking about; I
want to know what the *calls* are, what the *parameters* are that you are
proposing making three function calls with.  So far as I can see what you
are suggesting simply does not work unless you know a trick that I am
unaware of.

I was really talking about *READING* the stuff; I guess writing it is an
issue too when we are talking about transcoding.  Anyway the issue is the
same for both deflate and inflate:

z_struct zs.

memset(&zs, 0, sizeof zs);
<init the malloc fields>
zs.next_in = chunk_data_pointer;
zs.avail_in = chunk_length-1; /* Known */
zs.next_out = malloc(NUMBER/*UNKNOWN!*/);
zs.avail_out = NUMBER;

inflateInit(&zs);
if (inflate(&zs, Z_FINISH) != Z_STREAM_END)
    /* WHAT DO I DO NOW? */
inflateEnd(&zs);

This doesn't work; I have an unknown NUMBER and a far from obvious return
code check (IRC you have to read zlib.h very carefully to find the above.)

Unless you know a trick this is way beyond what an app programmer will do.

John Bowler

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