I have a problem loading a bitmap from memory with al_load_bitmap_f. Here's the situation: The bitmap data is in class1, and I get it from class2, which is derived class. Here's my code extract:
To me the code seems legit and should work fine. I wrote class1::Image_Data to disk and confirmed that the image is valid.
Could Anyone tell me any reasons for al_load_bitmap_f failing?
Do you call al_init and al_init_image_addon before this? Also, is your bitmap data of a bmp file, as you specified in al_load_bitmap_f?
This code works for me:
Check to see that the class1::ImageSize is right and if that is fine, then post the bitmap here... Allegro has trouble with some bitmap files (we suggest you use png/tga for that reason).
Do you call al_init and al_init_image_addon before this? Also, is your bitmap data of a bmp file, as you specified in al_load_bitmap_f?
Wow, such a terrible mistake I made... I think I need to take a little break...
Anyway, thanks for the reply.