News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

PNG image as resource

Started by lamer, August 30, 2005, 02:09:26 PM

Previous topic - Next topic

lamer

Hi all!
How can I add a PNG image as resource?
How can I then load this resouce and use it as bitmap?

Thank you

PBrennick

lamer,
You can do something like the following:

IDB_MAN         RCDATA  DISCARDABLE "Images\\Man.png"

This is taken from the Sokoban example and uses the PNG library.  I forget who wrote it.  I am including the project for you to examine.

Paul


[attachment deleted by admin]
The GeneSys Project is available from:
The Repository or My crappy website

lamer

Paul,
Thanks, I've passed the first level :bg :bg :bg
But all this jazz for reading pitiable PNG image? ::)
BMP is three times more, but needs only one line of code...

Thanks again

PBrennick

lamer,
That is because bmp is supported directly by the resource compiler.  png is too new for that.  Why not convert the image to bmp?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

lamer

Paul,
Just because of size.
BMP that weighs about 700 K could be saved as PNG that weighs about 170 K.

PBrennick

Lamer,
What about gif file format?

Paul
The GeneSys Project is available from:
The Repository or My crappy website

lamer


roticv


lamer

roticv,
It is a bit difficult to understand what they all are speaking about without attachment. :green2
I guess this is Sokoban game?

PBrennick

#9
Victor,
Thanks for the link. 

EDIT:  I have removed an incorrect statement about Spook's forum and I thank Victor for the correction..

Paul
The GeneSys Project is available from:
The Repository or My crappy website

roticv

Paul,

Actually your claim is false. It should be "all attachments on the forum before it was hacked into" was gone.  :toothy

PBrennick

Victor,
As usual, you steer me in the correct direction.  I appreciate your nice way of pointing out my mistakes.  Sorry about that.  I still wish that those zips would be made available to us though, I know they must still exist.  The zips on Hutch's old forum, for example, were not lost.  He allowed me to archive them and they are available to all as a link on Ghirai's website.  Why can't we do something similar with the old zips from Hiroshimator's old forum?  I would be willing to archive them.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Vortex

Hi lamer,

Ernest Murph coded a very nice image library. It can handle jpg, bmp,gif,wmf files. Here is my example to display jpg images from memory. It uses the image library.

http://www.masmforum.com/simple/index.php?topic=1720.msg13242#msg13242

lamer