$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Michael Marcin (mike_at_[hidden])
Date: 2007-05-14 00:16:13
Stefan Seefeld wrote:
> Michael Marcin wrote:
>> Hello,
>>
>> I have the need to load a PNG from a generic input stream that has a similar
>> interface (i.e. has a read, operator ! and fail with the same
>> signature/semantics as std::istream). The png reading extensions don't
>> appear to be able to load from anything other than a FILE*. In a library as
>> modern as GIL I'm sort of suprised there is apparently no way to load from a
>> generic stream.
>
> Indeed, I agree. (And I remember mentioning in the review that I found the FILE
> API to be inappropriate for a boost C++ API.)
>
>> Anyone have an idea how to make this happen? Perhaps there is another PNG
>> library written in C++ or a wrapper around the C libpng?
>
> I did write iostream adapters for libpng, and would happily contribute it
> to boost.GIL if there is interest.
>
I'm interested... could you perhaps put it in the vault?
Is it still efficient for loading PNGs? Does it require the stream to
backtrack?
Thanks,
Michael Marcin