|
load image from external lib? |
tom01 ms41
Member #15,370
October 2013
|
hi all: how can I load image from external lib (ex. freeimage) in allegro 5? thanks |
Elias
Member #358
May 2000
|
al_lock_bitmap with the format set to ABGR_LE is what I use. It expects data bytes for red, green, blue, alpha in that order. -- |
Aikei_c
Member #14,871
January 2013
|
tom01 ms41 said: how can I convert a buffer with rgba image data to ALLEGRO_BITMAP? Here is what I use: ALLEGRO_FILE* f = al_open_memfile(buffer,size,"r"); ALLEGRO_BITMAP* btmp = al_load_bitmap_f(f,extension); al_fclose(f); EDIT: Nevermind, it won't work, I actually have whole file in memory, not just rgba image data. |
|