|
Does al_load_bitmap_f work |
Niunio
Member #1,975
March 2002
|
Initially I thought it was a problem with Allegro.pas, but I did some testing with C and I have the same problem: it returns NULL. I'm using Linux Xubuntu 16.04.3 updated and latest Allegro 5.2.3. To reproduce the problem, get the ex_bitmap.c example and just add this at the beginning: ALLEGRO_FILE *lFile = NULL; Then search the line "bitmap = al_load_bitmap(filename);" and change it: /* bitmap = al_load_bitmap(filename); */ lFile = al_fopen (filename, "r"); bitmap = al_load_bitmap_f (lFile, filename); al_fclose (lFile); AFAIK it should work, but it didn't. Debugging with GDB it says in function al_load_bitmap_flags_f that "h" is NULL. Didn't look deeper. ----------------- |
Bruce Perry
Member #270
April 2000
|
Judging by a quick look at the source, the string argument should no longer be the filename, but the result of al_identify_bitmap or al_identify_bitmap_f - possibly the file extension but I'm not sure. Does that help? [EDIT] -- |
Niunio
Member #1,975
March 2002
|
Did a test (in Pascal) and didn't work. [edit] Anyway, the problem seems that Mr. Silly Me didn't read the documentation. ----------------- |
|