Boost logo

Boost Users :

Subject: Re: [Boost-users] [gil] New format guidelines about custom Device
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-12-22 15:01:17


Hi Mateusz,

On Wed, Dec 22, 2010 at 2:36 PM, Mateusz Loskot <mateusz_at_[hidden]> wrote:
> Hi,
>
> I'm implementing new image format support for Boost.GIL
> based on the new IO implementation which has been
> reviewed [1] lately.
>
> [1] http://lists.boost.org/boost-announce/2010/11/0273.php
>
> What would be the guidelines regarding custom Device implementation?
> Currently, only TIFF format implements it.
> When it is required to implement custom Device for the IO?
> When recommended as a good practice?

Right now, io_new is providing support for FILE*, std::istream, and
std::ostream. For TIFF I had to add another device type for TIFF*
since that's the one used in libtiff. All devices are registered using
c++ metafunctions, like is_output_device<...> and
is_input_device<...>.

You would have to add another device if the your one is missing. For
instance, boost::iostream is not there yet.

>
> I think it would be good to have such details documented.

It should be. I'll add it to my todo list.

Regards,
Christian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net