The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: mariø on April 26, 2005, 12:48:24 PM

Title: image from memory
Post by: mariø on April 26, 2005, 12:48:24 PM
I have a jpeg image file in memory as an array. How can I Show this image in a picture control?
I have read some about doing this with OleLoadPicture, but I don´t know how to use it.
Title: Re: image from memory
Post by: pbrennick on April 26, 2005, 01:44:42 PM
mariø,

BitmapFromMemory.ASM does what you need.  It is in \masm32\m32lib and is a part of the masm32 library. It was written by Ernest Murphy.  There are some other routines in that directory that you might find useful, also.

Paul
Title: Re: image from memory
Post by: mariø on April 27, 2005, 06:39:53 AM
BitmapFromMemory.ASM seems to be what I need, but I couldn't make any working example using this.
My Idea is to export BitmapFromMemory in a dll, but inside this function, the first call to OleLoadPicture dont fill the pPicture param...

has somebody a example of the use of this function??
Title: Re: image from memory
Post by: Vortex on April 27, 2005, 09:51:15 AM
Hi mariø,

Here is an example of BitmapFromFile

http://www.masmforum.com/simple/index.php?topic=937.0