Board index » delphi » Putting my BITMAPS into a RESOURCE FILE.

Putting my BITMAPS into a RESOURCE FILE.

I have some bitmaps that I need to put in a resource file. If I try to copy
the images into the resource file the image darkens (but it's using the
same palette). If I create or edit the image while in the resource file,
the image darkens when I save it - then it darkens it even more if I close
it and open it up again. Is there a better (or correct) way to get my
bitmaps into a resource file? Or maybe another tool other than the Image
Editor?

Thanks for any help - David.

 

Re:Putting my BITMAPS into a RESOURCE FILE.


David,

If the bitmaps already exist (you're not drawing them yourself at
the same time you're adding them to the resource file), you don't
need any kind of a resource editor. Just create a plain ASCII text
file with an .RC extension (for example, MYRES.RC). Don't use the
name of any form in your project (or your project itself).

Within the .RC file, add a line for each resource you want to
include:

MYBMP BITMAP  c:\images\mybmp.bmp
MYICO ICON    c:\icons\myico.ico

Save this file. From a DOS prompt, use BRCC.EXE (Delphi 1) or
BRCC32.EXE (Delphi 2 & 3) to compile the .RC file to a .RES:

BRCC32 MYRES.RC

In your project file, add the following:

{$R MYRES.RES}

Done!

HTH

Ken
---
Ken White
kwh...@westelcom.com

Clipper Functions for Delphi
http://members.aol.com/clipfunc

Quote
David Jones wrote:

> I have some bitmaps that I need to put in a resource file. If I try to copy
> the images into the resource file the image darkens (but it's using the
> same palette). If I create or edit the image while in the resource file,
> the image darkens when I save it - then it darkens it even more if I close
> it and open it up again. Is there a better (or correct) way to get my
> bitmaps into a resource file? Or maybe another tool other than the Image
> Editor?

> Thanks for any help - David.

Other Threads