Skip to content

Class drift::img::IImageCodec

ClassList > drift > img > IImageCodec

More...

  • #include <image_codec.h>

Inherited by the following classes: drift::img::GrayJpegCodec, drift::img::HslJpegCodec, drift::img::RgbJpegCodec

Public Functions

Type Name
virtual bool Decode (const std::string & blob, SignalN2D * image, size_t start_channel=0) const = 0
virtual bool Encode (const SignalN2D & image, std::string * blob, size_t start_channel=0) const = 0
virtual size_t channel_number () const = 0
virtual bool checkChannelsShape (const SignalN2D & image, size_t start_channel) const = 0
virtual ~IImageCodec () = default

Detailed Description

Abstract interface for image codecs

Public Functions Documentation

function Decode

virtual bool drift::img::IImageCodec::Decode (
    const std::string & blob,
    SignalN2D * image,
    size_t start_channel=0
) const = 0

Decodes a picture from a string to blaze matrices

Parameters:

  • blob the string with the picture in some image format
  • image a pointer to decoded blaze image
  • start_channel

Returns:

false if there is an error

function Encode

virtual bool drift::img::IImageCodec::Encode (
    const SignalN2D & image,
    std::string * blob,
    size_t start_channel=0
) const = 0

Encodes a blaze image to string in some image format

Parameters:

  • image the blaze image to encoded
  • blob an encoded string
  • start_channel

Returns:

false if there is an error

function channel_number

virtual size_t drift::img::IImageCodec::channel_number () const = 0

function checkChannelsShape

virtual bool drift::img::IImageCodec::checkChannelsShape (
    const SignalN2D & image,
    size_t start_channel
) const = 0

function ~IImageCodec

virtual drift::img::IImageCodec::~IImageCodec () = default

The documentation for this class was generated from the following file wavelet_buffer/img/image_codec.h