I know, I know, this is not a question about the C++ language, but
a question about a library (and a C library at that). I know this is
a great faux pas. But the thing is, I would ask this in a relevant
group, or online forum, if there existed one. But as far as I can
gather, there is no such thing. There is no online forum for libpng
questions. (There is a mailing list yes, but this is not 1995 anymore,
mailing lists are a really antiquated and inconvenient form of
discussion, and I really am not willing to have my mail inbox be flooded
with irrelevant things because of this one question. It seems that
the libpng team is still living in 1995. Just look at their official
home page if you don't believe me.) There doesn't even seem to exist
a usenet group with the letters "png" in its name (at least not on
this news server).
So I was wondering if anybody here with expertise about libpng could
cast some light on this.
If I open a png file, do some modifications to its pixel data, and
then save it to another file, is there a way to transfer all metadata
from the input file to the output file? I'm assuming that all the
metadata is stored in the png_info struct, but according to the
documentation (in plain txt format; because we are still in 1995)
the png_info struct has to be created anew using a different png_struct
object for writing, than it was done for reading. I don't know if its
kosher to take the same png_info that was created for reading and use
it for writing.
The second question is how to make a copy of a png_info object.
I can't find any function to do that. (Since this is a C library,
not a C++ one, even if you could assign what png_infop points to,
to another instance, that would probably lead to leaks. But even
that's not possible because png_infop is an opaque pointer.)
--- news://
freenews.netfront.net/ - complaints:
ne...@netfront.net ---