Image I/O addon

al_init_iio_addon

bool al_init_iio_addon(void)

Initializes the IIO addon.

al_shutdown_iio_addon

void al_shutdown_iio_addon(void)

Shut down the IIO addon. This is done automatically at program exit, but can be called any time the user wishes as well.

al_register_bitmap_loader

bool al_register_bitmap_loader(const char *extension,
   ALLEGRO_BITMAP *(*loader)(const char *filename))

Register a handler for al_load_bitmap. The given function will be used to handle the loading of bitmaps files with the given extension.

The extension should include the leading dot ('.') character. It will be matched case-insensitively.

The loader argument may be NULL to unregister an entry.

Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist.

al_register_bitmap_saver

bool al_register_bitmap_saver(const char *extension,
   bool (*saver)(const char *filename, ALLEGRO_BITMAP *bmp))

Register a handler for al_save_bitmap. The given function will be used to handle the loading of bitmaps files with the given extension.

The extension should include the leading dot ('.') character. It will be matched case-insensitively.

The saver argument may be NULL to unregister an entry.

Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist.

al_register_bitmap_loader_entry

bool al_register_bitmap_loader_entry(const char *extension,
   ALLEGRO_BITMAP *(*loader_entry)(ALLEGRO_FILE *pf))

Register a handler for al_load_bitmap_entry. The given function will be used to handle the loading of bitmaps files with the given extension.

The extension should include the leading dot ('.') character. It will be matched case-insensitively.

The fs_loader argument may be NULL to unregister an entry.

Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist.

al_register_bitmap_saver_entry

bool al_register_bitmap_saver_entry(const char *extension,
   bool (*saver_entry)(ALLEGRO_FILE *pf, ALLEGRO_BITMAP *bmp))

Register a handler for al_save_bitmap_entry. The given function will be used to handle the loading of bitmaps files with the given extension.

The extension should include the leading dot ('.') character. It will be matched case-insensitively.

The saver_entry argument may be NULL to unregister an entry.

Returns true on success, false on error. Returns false if unregistering an entry that doesn't exist.

al_load_bitmap

ALLEGRO_BITMAP *al_load_bitmap(const char *filename)

Loads an image file into an ALLEGRO_BITMAP. The file type is determined by the extension.

Returns NULL on error.

See also: al_load_bitmap_entry, al_register_bitmap_loader

al_load_bitmap_entry

ALLEGRO_BITMAP *al_load_bitmap_entry(ALLEGRO_FILE *pf, const char *ident)

Loads an image from an ALLEGRO_FS_ENTRY into an ALLEGRO_BITMAP. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot.

Returns NULL on error.

See also: al_load_bitmap, al_register_bitmap_loader_entry

al_save_bitmap

bool al_save_bitmap(const char *filename, ALLEGRO_BITMAP *bitmap)

Saves an ALLEGRO_BITMAP to an image file. The file type is determined by the extension.

Returns true on success, false on error.

See also: al_save_bitmap_entry, al_register_bitmap_saver

al_save_bitmap_entry

bool al_save_bitmap_entry(ALLEGRO_FILE *pf, const char *ident,
   ALLEGRO_BITMAP *bitmap)

Saves an ALLEGRO_BITMAP to an ALLEGRO_FS_ENTRY. The file type is determined by the passed 'ident' parameter, which is a file name extension including the leading dot.

Returns true on success, false on error.

See also: al_save_bitmap, al_register_bitmap_saver_entry

al_load_bmp

ALLEGRO_BITMAP *al_load_bmp(const char *filename)

Create a new ALLEGRO_BITMAP from a BMP file. The bitmap is created with al_create_bitmap.

Returns NULL on error.

See Also: al_load_bitmap.

al_load_jpg

ALLEGRO_BITMAP *al_load_jpg(char const *filename)

Create a new ALLEGRO_BITMAP from a JPEG file. The bitmap is created with al_create_bitmap.

Returns NULL on error.

See Also: al_load_bitmap.

al_load_pcx

ALLEGRO_BITMAP *al_load_pcx(const char *filename)

Create a new ALLEGRO_BITMAP from a PCX file. The bitmap is created with al_create_bitmap.

Returns NULL on error.

See Also: al_load_bitmap.

al_load_png

ALLEGRO_BITMAP *al_load_png(const char *filename)

Create a new ALLEGRO_BITMAP from a PNG file. The bitmap is created with al_create_bitmap.

Returns NULL on error.

See Also: al_load_bitmap.

al_load_tga

ALLEGRO_BITMAP *al_load_tga(const char *filename)

Create a new ALLEGRO_BITMAP from a TGA file. The bitmap is created with al_create_bitmap.

Returns NULL on error.

See Also: al_load_bitmap.

al_save_bmp

bool al_save_bmp(const char *filename, ALLEGRO_BITMAP *bmp)

Save an ALLEGRO_BITMAP as a BMP file.

Returns true on success, false on error.

See Also: al_save_bitmap.

al_save_jpg

bool al_save_jpg(char const *filename, ALLEGRO_BITMAP *bmp)

Save an ALLEGRO_BITMAP as a JPEG file.

Returns true on success, false on error.

See Also: al_save_bitmap.

al_save_pcx

bool al_save_pcx(const char *filename, ALLEGRO_BITMAP *bmp)

Save an ALLEGRO_BITMAP as a PCX file.

Returns true on success, false on error.

See Also: al_save_bitmap.

al_save_png

bool al_save_png(const char *filename, ALLEGRO_BITMAP *bmp)

Save an ALLEGRO_BITMAP as a PNG file.

Returns true on success, false on error.

See Also: al_save_bitmap.

al_save_tga

bool al_save_tga(const char *filename, ALLEGRO_BITMAP *bmp)

Save an ALLEGRO_BITMAP as a TGA file.

Returns true on success, false on error.

See Also: al_save_bitmap.

Last updated: 2009-08-09 08:22:39 UTC