Hello, I'm completely new to allegro and I'm writing a program to dither image files. Unfortunatelly it's a task for programming classes and I couldn't choose any other library for that (normally I'd use something that is created specially for this purpose). The problem is as follows:
I load the bitmap from file:
image = al_load_bitmap(imagePath.c_str());
then I display it:
Until then everything goes fine, however there's a problem later. Whenever I use al_draw_pixel, it draws the pixels successfuly and even displays the image after it's done, however after I try to save the same image I just modified, or alter it using another function, it does not work on the modified image, but on the image that was initially loaded. I.e. when I save it, even though it's modified, I obtain saved copy of the source file. What can be the source of this problem? At every attempt to modify the bitmap, I use al_lock_bitmap(image,al_get_bitmap_format(image), ALLEGRO_LOCK_READWRITE);
and then once it's done, I unlock it.
Please help me, it's a real struggle for me and my time is very limited so that I cannot unfortunately read the whole documentation