The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Ash_ on April 15, 2005, 06:31:31 AM

Title: Saving Images.
Post by: Ash_ on April 15, 2005, 06:31:31 AM
how can i save an image if i have the hDC of the image. do i have to use an external library (such as GDIPlus) or is there Windows API calls i can use to save images.

thanks in advance.
Title: Re: Saving Images.
Post by: Vortex on April 15, 2005, 09:51:48 AM
Donkey coded an image library, it has also some functions to save images:
Quote
DIBSaveBitmap , SaveDIB32

Graphics.lib

http://donkey.visualassembler.com/libs.htm
Title: Re: Saving Images.
Post by: Bieb on April 15, 2005, 05:45:23 PM
I just recently wrote a program to do it.  You're going to need to fill out a BITMAPFILEHEADER structure and use GETDIBITS (API function) to get the color data, then write both to a file.  I'll give you some example code when I get home.

Oh, and in the meantime, check out http://www.wotsit.org for the bitmap file format.
Title: Re: Saving Images.
Post by: Brett Kuntz on June 20, 2006, 01:37:14 AM
Quote from: Vortex on April 15, 2005, 09:51:48 AM
Donkey coded an image library, it has also some functions to save images:
Quote
DIBSaveBitmap , SaveDIB32

Graphics.lib

http://donkey.visualassembler.com/libs.htm

Does anyone know where his lib's have gone? I used one in an old project that I'm resurrecting, and am short a lib!
Title: Re: Saving Images.
Post by: Casper on June 20, 2006, 01:41:46 AM
Yes ...

http://www3.telus.net/~edgarh1/

... is the correct URL.

Casper
Title: Re: Saving Images.
Post by: Brett Kuntz on June 20, 2006, 02:48:11 AM
Thanks! :)
Title: Re: Saving Images.
Post by: donkey on June 20, 2006, 03:31:12 AM
That URL is just where my site is redirected to currently and could change at any time, the actual URL you should be using is...

http://www.assembler.ca/

Donkey
Title: Re: Saving Images.
Post by: Casper on June 20, 2006, 05:29:39 AM
Donkey,

Thank you for the correction.  I do not know where I got that link, just knew it worked.  It is good to know what your domain name is, now.

Casper
Title: Re: Saving Images.
Post by: donkey on June 20, 2006, 06:18:40 AM
No probs Casper,

Any updates or new stuff are usually uploaded to www.assembler.ca before my personal webspace, I just use that redirection when I am pushing my bandwidth limit or forget to remove the domain forwarding. I have been considerring taking over visualassembler.com from _shawn but for now have too many other things on my plate to get around to it, in that case the other link may be up again one day as well.

Donkey