News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

gdi compress bitmap rle?

Started by daydreamer, March 19, 2019, 09:45:16 AM

Previous topic - Next topic

daydreamer

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+?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

RLE is not very efficient, but with Gdi+ you can save it as GIF or PNG.

Siekmanski

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
Creative coders use backward thinking techniques as a strategy.

daydreamer

thanks very much for your great code example Siekmanski :t
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding