I tried it out with the attached C program on Linux, with a 24 bit bitmap of 2000x2000, and it takes about 2 seconds to load and save. So, no, what you are seeing isn't normal. Could you try out my attached program and see if it works for you? The input bitmap must be named input.bmp and be in the same folder as the executable.

It might be that it takes a long time for the Allegro shared libraries to be loaded, but otherwise I can't see why it would be so slow unless your system is seriously underpowered. If you know how to use a debugger, you could interrupt your program with it during saving and see where it is getting stuck.

hi beoran, my cpu is an amd athlon 64 x2 4200+, i have 4 gb ram ddr2, nvidia gforce 210 graphics card with 1024 mb. I ran my program on an Intel i3 and it takes 9 seconds. Where can I see your program attached?

How long does it take to save the bitmap with an image editor on your system? The bottleneck is likely to be the hard disk. If an image editor is comparably slow, it might be your system really is underpowered.

Now, however it may be, let's talk mitigation. If you want to save such a large image "live", without interrupting your program, you will need to do it in a worker thread. Allegro5 has threads to help you achieve this.

Hi. Beoran compiled your code adapted to "visual studio" but it takes the same.With Photoshop, the same image from jpg to bmp takes 1 second.I have used a RAMDISK and it does not improve. I think the problem may be thatal_save_bitmap needs a very fast cpu.I've tried everything Chris, I'll keep trying ...

Thanks for the input. I measure the time in the following way ...I print on the screen the word "start", then I put the command al_save_bitmap and print "end" on the screen ... I execute and measure with antime between one word and another. I know it's a very basic method, but I've measured itwith the own visual study (counter time) and it is the same ..Everything else in allegro is very fast, I can load 120 photos (2432x3648) in less than 3 minutes converting them from jpg to bmp (djpeg.exe) (external call) and reducing them to 333x500 .. but al_save_bitmap is a problem and that I have given my program maximum priority (cpu) ..I thank everyone for your help, thank you

No, i checked the code, and saving a bmp bitmap seems to be handled internally. However , it locks the bitmap in 8888 format, which might be slow. Could you try to call al_lock_bitmap(bmp, ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE, ALLEGRO_LOCK_READONLY) on your loaded bitmap and time that? Maybe that is causing the slowdown.

Edit, I should have read a bit more because I was wrong, there is a windows specific image loader and saver for bmp. So yes, also try the tfa file format.

I will try all these ideas, to see if I accelerate it. if it could be compiled in 64 bits I guess it would improve a lot but I think it's not possible. It is possible that it could be compiled for some reason. Everything else with allegro works perfect.Another option would be to create a program that generates a bmp from a 24 bit bitmap to not use this function. I have seen when I run it that it uses 30% cpu from the visual studio. thanks to all.

I have already tried the solutions. saving in TGA format takes 33 seconds.