---
name: "al_load_bitmap"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_load_bitmap/3alleg5"
---

# al\_load\_bitmap(3alleg5)

Allegro 5 API

## NAME

al\_load\_bitmap - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_BITMAP *al_load_bitmap(const char *filename)
  ```

## DESCRIPTION

Loads an image file into a new ALLEGRO\_BITMAP(3alleg5). The file type is determined by al\_identify\_bitmap(3alleg5), using the extension as a fallback in case identification is not possible.

Returns NULL on error.

This is the same as calling al\_load\_bitmap\_flags(3alleg5) with a flags parameter of 0.

*Note:* the core Allegro library does not support any image file formats by default. You must use the allegro\_image addon, or register your own format handler.

## SEE ALSO

al\_load\_bitmap\_flags(3alleg5), al\_load\_bitmap\_f(3alleg5), al\_register\_bitmap\_loader(3alleg5), al\_set\_new\_bitmap\_format(3alleg5), al\_set\_new\_bitmap\_flags(3alleg5), al\_init\_image\_addon(3alleg5)
