image.h

An image abstraction for working with image data. [詳細]

#include <nds/arm9/video.h>
#include <nds/arm9/pcx.h>

ソースコードを見る。

構成

struct  RGB_24
 holds a red green blue triplet [詳細]
struct  sImage
 A generic image structure. [詳細]

型定義

typedef struct RGB_24 RGB_24
typedef struct sImage sImage
typedef struct sImagepsImage

関数

void image24to16 (sImage *img)
 Converts a 24 bit image to 16 bit.
void image8to16 (sImage *img)
 Converts an 8 bit image to 16 bit setting the alpha bit.
void image8to16trans (sImage *img, u8 transparentColor)
 Converts an 8 bit image to 16 bit with alpha bit cleared for the supplied palette index.
void imageDestroy (sImage *img)
 frees the image data. Only call if the image data was returned from an image loader
void imageTileData (sImage *img)
 Tiles 8 bit image data into a sequence of 8x8 tiles.

説明

An image abstraction for working with image data.

Image data pointers must be allocated using malloc as the conversion rutiens will free the pointers and allocate new data. As such any loader implemented utilizing this structure must use malloc() to allocate the image pointer data.

関数

void image24to16 ( sImage img  ) 

Converts a 24 bit image to 16 bit.

引数:
img a pointer to image to manipulate
void image8to16 ( sImage img  ) 
void image8to16trans ( sImage img,
u8  transparentColor 
)

Converts an 8 bit image to 16 bit with alpha bit cleared for the supplied palette index.

引数:
img a pointer to image to manipulate
transparentColor Color indexes equal to this value will have the alpha bit clear
例:
Graphics/3D/nehe/lesson09/source/nehe9.cpp.
void imageDestroy ( sImage img  ) 

frees the image data. Only call if the image data was returned from an image loader

引数:
img a pointer to image to manipulate (the image data will be free() )
例:
Graphics/3D/nehe/lesson06/source/nehe6.cpp, Graphics/3D/nehe/lesson07/source/nehe7.cpp, Graphics/3D/nehe/lesson08/source/nehe8.cpp, Graphics/3D/nehe/lesson09/source/nehe9.cpp, と input/Touch_Pad/touch_look/source/main.cpp.
void imageTileData ( sImage img  ) 

Tiles 8 bit image data into a sequence of 8x8 tiles.

引数:
img a pointer to image to manipulate
例:
Graphics/Sprites/fire_and_sprites/source/main.cpp.
 全て クラス ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義
libndsに対してMon Apr 26 23:39:50 2010に生成されました。  doxygen 1.6.3