抽象画像データを扱うためのクラス [詳解]
#include <scMetaImg.h>
公開メンバ関数 | |
scMetaImg () | |
virtual | ‾scMetaImg () |
scMetaImg & | operator= (const scMetaImg &rhs) |
int | Width () const |
int | Height () const |
int | Bit () const |
int | Channel () const |
SC_METAIMG_PALETTE * | Palette () |
const SC_METAIMG_PALETTE * | CstPalette () const |
int | PaletteSize () const |
int | Resize (int width, int height, int bit, int channel) |
int | Resize (const scMetaImg *ref_img) |
void * | ImgPtr (int index) const |
unsigned char * | ImgPtr08 (int index) const |
unsigned short * | ImgPtr16 (int index) const |
const unsigned char * | CstImgPtr08 (int index) const |
const unsigned short * | CstImgPtr16 (int index) const |
unsigned char ** | ImgPtr08_2d () const |
unsigned short ** | ImgPtr16_2d () const |
const unsigned char ** | CstImgPtr08_2d () const |
const unsigned short ** | CstImgPtr16_2d () const |
限定公開メンバ関数 | |
scMetaImg (const scMetaImg &rhs) | |
void * | MemCpy__ (void *buf1, const void *buf2, int byte_size) |
限定公開変数類 | |
void * | buf1d_ |
void ** | buf2d_ |
int | width_ |
int | height_ |
int | bit_ |
int | channel_ |
SC_METAIMG_PALETTE * | ary_palette_ |
int | palette_size_ |
抽象画像データを扱うためのクラス
このクラスは、抽象画像データを扱うための機能を提供する。 画素データは void型配列 によって格納される。 画素データが格納されるメモリは、コンストラクタ、代入、Resize 関数によって自動的に確保される。 代入、Resize 関数によって元の配列は破棄され、画素格納アドレスが変更されることに留意すること。
|
protected |
コピーコンストラクタ
|
inline |
コンストラクタ
|
inline |
|
inline |
|
inline |
[in] | index | 色の指定 |
|
inline |
|
inline |
[in] | index | 色の指定 |
|
inline |
|
inline |
|
inline |
|
inline |
[in] | index | 色の指定 |
|
inline |
[in] | index | 色の指定 |
|
inline |
|
inline |
[in] | index | 色の指定 |
|
inline |
各色の画素データの先頭アドレスを unsigned short ** で帰す。
|
inlineprotected |
メモリコピー
|
inline |
|
inline |
|
inline |
画像情報の更新とメモリの確保を行なう。 関数呼び出し前の画素データは破棄される。 メモリサイズ( buf_size、バイト数 )は、以下のように算出される。 ※DLLで構築したインスタンスは、このメンバ関数を実行してはならない。
[in] | width | 新しい画像の幅 |
[in] | height | 新しい画像の高さ |
[in] | bit | 新しい画像の単色のビット数 |
[in] | channel | 新しい画像の色数 |
|
inline |
入力したscMetaImg型変数を参照し、画像情報と更新とメモリの確保を行なう。 画像情報とメモリサイズは、参照するインスタンスと同じになる。 関数呼び出し前の画素データは破棄される。 ※DLLで構築したインスタンスは、このメンバ関数を実行してはならない。
[in] | ref_img | 参照するscMetaImg型変数のポインタ |
|
inline |
|
inlinevirtual |
デストラクタ buf1d_、buf2d_ がNULLでは無い場合、これらを解放する。
|
protected |
パレット
|
protected |
単色1画素の情報量
現状では、1bit、8 bit、16 bit のみサポートしている。
|
protected |
画素データを格納するバッファの先頭アドレス。 各色の画素データが面順次でシーケンシャルに格納される。 画像原点は左上。
ラインデータのサイズは、1バイトの倍数でなければならない。 line_bytesize = ( width * bit + 7 ) / 8 width : 横方向の画素数 bit : 単色1画素の情報量
|
protected |
画素データの各色の先頭アドレス
|
protected |
色数 RGB画像なら色数=3、インデックスカラーなら色数=1
|
protected |
画像の高さ
|
protected |
パレットサイズ
|
protected |
画像の幅