75 #ifndef __FK_IMAGE_HEADER__
76 #define __FK_IMAGE_HEADER__
83 #ifndef FK_DOXYGEN_USER_PROCESS
86 typedef unsigned char fk_ImType;
87 typedef unsigned int fk_TexID;
89 #include <FK/OpenGL.H>
90 typedef GLubyte fk_ImType;
91 typedef GLuint fk_TexID;
161 void set(
int w,
int h);
185 fk_Rect(
int x = 0,
int y = 0,
int w = 0,
int h = 0);
197 void set(
int x,
int y,
int w,
int h);
242 std::vector<fk_ImType> imageBuf;
243 fk_ImType *bufPointer;
249 unsigned int ChgUInt(fk_ImType *,
int)
const;
250 unsigned int ChgUShort(fk_ImType *,
int)
const;
252 int GetOffset(
int,
int)
const;
253 fk_ImType RoundVal(
int)
const;
254 fk_ImageStatus CreateImg(
const std::string);
255 fk_ImageStatus CreateImg(fk_ImType *);
256 void CreateBuffer(
bool =
true);
257 void CreateBuffer(
int,
int,
bool =
true);
259 bool IsPixelStatus(
int,
int)
const;
260 int GetOneBufferSize(
int,
int);
261 int GetFixVal(fk_ImageFix,
int)
const;
263 void SetLong2Byte(
long, fk_ImType *,
int);
264 void SetInt2Byte(
int, fk_ImType *,
int);
266 bool GetInitFlag(
void);
267 void SetInitFlag(
bool);
268 void SetTexID(
const fk_TexID);
270 bool IsBmpFile(
const std::string)
const;
271 bool IsBmpData(fk_ImType *)
const;
272 fk_ImageStatus LoadBmpFile(
const std::string);
273 fk_ImageStatus LoadBmpData(fk_ImType *);
274 void SetRGBA4Bmp(
int,
int, fk_ImType *,
275 int, std::vector<fk_ImType> &);
277 bool GetBmpFileHeader(FILE *, fk_ImType *);
278 bool GetBmpInfoHeader(FILE *, fk_ImType *);
281 fk_ImageStatus SaveBmpFile(std::string,
bool);
282 void MakeBmpFileHeader(
int,
int,
int,
283 std::vector<fk_ImType> &);
284 void MakeBmpInfoHeader(
int,
int,
int,
285 std::vector<fk_ImType> &);
286 void MakeBmpBuffer(
int,
int,
bool, fk_ImType *);
288 bool IsPngFile(
const std::string)
const;
289 bool IsPngData(fk_ImType *)
const;
290 fk_ImageStatus LoadPngFile(
const std::string);
291 fk_ImageStatus LoadPngData(fk_ImType *);
323 bool readBMP(
const std::string fileName);
345 bool readPNG(
const std::string fileName);
365 bool readJPG(
const std::string fileName);
381 bool writeBMP(
const std::string fileName,
382 const bool transFlg =
false);
394 bool writePNG(
const std::string fileName,
395 const bool transFlg =
true);
411 bool writeJPG(
const std::string fileName,
426 void newImage(
int w,
int h,
bool initFlg =
true);
464 int x,
int y,
int w,
int h);
520 int getR(
int x,
int y)
const;
533 int getG(
int x,
int y)
const;
546 int getB(
int x,
int y)
const;
559 int getA(
int x,
int y)
const;
592 bool setRGBA(
int x,
int y,
int r,
int g,
int b,
int a);
611 bool setRGB(
int x,
int y,
int r,
int g,
int b);
628 bool setR(
int x,
int y,
int r);
645 bool setG(
int x,
int y,
int g);
662 bool setB(
int x,
int y,
int b);
679 bool setA(
int x,
int y,
int a);
716 void fillColor(
int r,
int g,
int b,
int a = 0);
734 #ifndef FK_DOXYGEN_USER_PROCESS
736 fk_TexID GetTexID(
void);
737 void ClearUpdateArea(
void);
738 void SetUpdateArea(
void);
739 void SetUpdateArea(
int,
int,
int,
int);
746 #endif // __FK_IMAGE_HEADER__
int x
領域左上の x 座標
Definition: Image.h:173
virtual ~fk_Image()
デストラクタ
fk_Color getColor(int x, int y) const
ピクセル色要素取得関数
int y
領域左上の y 座標
Definition: Image.h:174
const fk_ImType * getBufPointer(void) const
画像データ配列先頭アドレス取得関数
bool writeBMP(const std::string fileName, const bool transFlg=false)
BMP ファイル出力関数
int getR(int x, int y) const
ピクセルR要素取得関数
bool setA(int x, int y, int a)
ピクセル A 値設定関数
fk_Dimension getSize(void)
領域サイズ参照関数
PNG 形式
Definition: Image.h:123
void newImage(int w, int h, bool initFlg=true)
画像領域生成関数
bool writeJPG(const std::string fileName, int quality=80)
JPEG ファイル出力関数
int h
画像の縦幅
Definition: Image.h:144
fk_SnapProcMode
画像取り込み方法を表す列挙型
Definition: Image.h:128
int getA(int x, int y) const
ピクセルA要素取得関数
int getWidth(void) const
画像横幅取得関数
int w
領域の横幅
Definition: Image.h:175
int w
画像の横幅
Definition: Image.h:143
bool readPNG(const std::string fileName)
PNG ファイル入力関数
RGB色を管理するクラス
Definition: Material.h:92
void setPos(int x, int y)
領域位置設定関数
void setSize(int w, int h)
領域サイズ設定関数
bool writePNG(const std::string fileName, const bool transFlg=true)
PNG ファイル出力関数
Windows Bitmap (BMP) 形式
Definition: Image.h:122
void set(int x, int y, int w, int h)
領域設定関数
OpenGL バックバッファ
Definition: Image.h:130
画像中の矩形領域を表すクラス
Definition: Image.h:171
int getG(int x, int y) const
ピクセルG要素取得関数
fk_Dimension(int w=0, int h=0)
コンストラクタ
void set(int w, int h)
画像サイズ設定関数
FK の各クラスの基盤となる基本クラス
Definition: Base.h:212
テクスチャ用基底クラス
Definition: Texture.h:160
bool readPNGData(fk_ImType *buf)
PNG データ入力用関数
bool subImage(const fk_Image *image, int x, int y, int w, int h)
画像データ部分抽出関数
const fk_Dimension * getImageSize(void)
画像サイズ取得関数
bool setRGBA(int x, int y, int r, int g, int b, int a)
ピクセル RGBA 値設定関数
const fk_Dimension * getBufferSize(void)
画像バッファサイズ取得関数
bool setColor(int x, int y, const fk_Color &col)
ピクセル色値設定関数
fk_ImageType
画像フォーマットを表す列挙型
Definition: Image.h:121
画像を生成、管理するクラス
Definition: Image.h:235
bool setRGB(int x, int y, int r, int g, int b)
ピクセル RGB 値設定関数
bool setR(int x, int y, int r)
ピクセル R 値設定関数
void copyImage(const fk_Image *image)
画像データコピー関数1
JPEG 形式
Definition: Image.h:124
bool readBMPData(fk_ImType *buf)
BMP バッファ入力関数
int h
領域の縦幅
Definition: Image.h:176
画像サイズを表すクラス
Definition: Image.h:141
bool setB(int x, int y, int b)
ピクセル B 値設定関数
fk_Rect(int x=0, int y=0, int w=0, int h=0)
コンストラクタ
int getHeight(void) const
画像縦幅取得関数
OpenGL フロントバッファ
Definition: Image.h:129
void fillColor(const fk_Color &col)
バッファ全体初期化関数1
bool setG(int x, int y, int g)
ピクセル G 値設定関数
fk_Image(int w=0, int h=0)
コンストラクタ
Win32 GDI (Windows プラットフォームのみ対応)
Definition: Image.h:131
Direct3D フルスクリーンバッファ (Direct3D版のみ対応)
Definition: Image.h:133
Direct3D ウィンドウバッファ (Direct3D版のみ対応)
Definition: Image.h:132
bool readJPG(const std::string fileName)
JPEG ファイル入力関数
int getB(int x, int y) const
ピクセルB要素取得関数
bool readBMP(const std::string fileName)
BMP ファイル入力関数