1create_bitmap_ex(3) Allegro manual create_bitmap_ex(3)
2
3
4
6 create_bitmap_ex - Creates a memory bitmap specifying color depth.
7 Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 BITMAP *create_bitmap_ex(int color_depth, int width, int height);
14
16 Creates a bitmap in a specific color depth (8, 15, 16, 24 or 32 bits
17 per pixel). Example:
18
19 /* Create screen sized bitmap in 32 bits per pixel. */
20 BITMAP *bmp = create_bitmap_ex(32, SCREEN_W, SCREEN_H);
21 if (!bmp)
22 abort_on_error("Couldn't create bitmap!");
23 /* Use the bitmap. */
24 ...
25 /* Destroy it when we don't need it any more. */
26 destroy_bitmap(bmp);
27
29 Returns a pointer to the created bitmap, or NULL if the bitmap could
30 not be created. Remember to free this bitmap later to avoid memory
31 leaks.
32
33
34
36 create_bitmap(3), create_sub_bitmap(3), create_video_bitmap(3), cre‐
37 ate_system_bitmap(3), destroy_bitmap(3), is_memory_bitmap(3),
38 clear_bitmap(3), clear_to_color(3), ex12bit(3), exlights(3),
39 exrgbhsv(3), extrans(3)
40
41
42
43Allegro version 4.2.3 create_bitmap_ex(3)