gKit2 light
Loading...
Searching...
No Matches
ImageData Struct Reference

stockage temporaire des donnees d'une image. More...

#include <image_io.h>

Public Member Functions

 ImageData (const unsigned w, const unsigned h, const unsigned c, const unsigned s=1)
unsigned offset (const unsigned x, const unsigned y, const unsigned c=0) const
const void * data () const
void * data ()

Public Attributes

std::vector< unsigned char > pixels
unsigned width
unsigned height
unsigned channels
unsigned size

Detailed Description

stockage temporaire des donnees d'une image.

Definition at line 52 of file image_io.h.

Constructor & Destructor Documentation

◆ ImageData() [1/2]

ImageData::ImageData ( )
inline

Definition at line 54 of file image_io.h.

54: pixels(), width(0), height(0), channels(0), size(0) {}

◆ ImageData() [2/2]

ImageData::ImageData ( const unsigned w,
const unsigned h,
const unsigned c,
const unsigned s = 1 )
inline

Definition at line 55 of file image_io.h.

55: pixels(w*h*c*s, 0), width(w), height(h), channels(c), size(s) {}

Member Function Documentation

◆ offset()

unsigned ImageData::offset ( const unsigned x,
const unsigned y,
const unsigned c = 0 ) const
inline

Definition at line 57 of file image_io.h.

57{ return (y * width +x) * channels * size + c * size; }

◆ data() [1/2]

const void * ImageData::data ( ) const
inline

Definition at line 58 of file image_io.h.

58{ return pixels.data(); }

◆ data() [2/2]

void * ImageData::data ( )
inline

Definition at line 59 of file image_io.h.

59{ return pixels.data(); }

Member Data Documentation

◆ pixels

std::vector<unsigned char> ImageData::pixels

Definition at line 61 of file image_io.h.

◆ width

unsigned ImageData::width

Definition at line 63 of file image_io.h.

◆ height

unsigned ImageData::height

Definition at line 64 of file image_io.h.

◆ channels

unsigned ImageData::channels

Definition at line 65 of file image_io.h.

◆ size

unsigned ImageData::size

Definition at line 66 of file image_io.h.


The documentation for this struct was generated from the following file: