Let's say I draw a map in paint or a program using lot of gdi app calls to make a map,I want gdi save it rle bitmap compressed,so the map becomes smaller,how do I make gdi code that saves it in rle encoded format?
Or do I need gdi+?
RLE is not very efficient, but with Gdi+ you can save it as GIF or PNG.
Hi Magnus,
I think the easiest way is to use GDI+ ( as Jochen wrote ) to save the bitmaps, with these 2 functions: "GdipCreateBitmapFromScan0" and "GdipSaveImageToFile"
You can save the raw 32bit ARGB bitmap as BMP,JPG,GIF,TIF or PNG.
Here is some example code how to load and save the bitmap formats with GDI+:
http://masm32.com/board/index.php?action=dlattach;topic=6127.0;attach=6429
The code is in this file: 2D_Image_loader_saver.Asm
thanks very much for your great code example Siekmanski :t