Skip to content

Class drift::img::GrayJpegCodec

ClassList > drift > img > GrayJpegCodec

More...

  • #include <jpeg_codecs.h>

Inherits the following classes: drift::img::IImageCodec

Public Functions

Type Name
virtual bool Decode (const std::string & blob, SignalN2D * image, size_t start_channel=0) override const
virtual bool Encode (const SignalN2D & image, std::string * blob, size_t start_channel=0) override const
GrayJpegCodec ()
GrayJpegCodec (DataType quality)
virtual size_t channel_number () override const
virtual bool checkChannelsShape (const SignalN2D & image, size_t start_channel) override const

Public Functions inherited from drift::img::IImageCodec

See drift::img::IImageCodec

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

Class to read and write JPEGs by using gray color scheme

Public Functions Documentation

function Decode

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

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

Implements drift::img::IImageCodec::Decode

function Encode

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

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

Implements drift::img::IImageCodec::Encode

function GrayJpegCodec [1/2]

drift::img::GrayJpegCodec::GrayJpegCodec () 

function GrayJpegCodec [2/2]

explicit drift::img::GrayJpegCodec::GrayJpegCodec (
    DataType quality
) 

function channel_number

inline virtual size_t drift::img::GrayJpegCodec::channel_number () override const

Implements drift::img::IImageCodec::channel_number

function checkChannelsShape

virtual bool drift::img::GrayJpegCodec::checkChannelsShape (
    const SignalN2D & image,
    size_t start_channel
) override const

Implements drift::img::IImageCodec::checkChannelsShape


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