Board index » delphi » 24bit colored bitmaps into resource files, how? (delphi5)

24bit colored bitmaps into resource files, how? (delphi5)

Hi,

I need for my component a few pre-stored / pre-loaded 24bit colored bitmaps in a (component)resource file.
Image Editor only supports up to 256 colors....

Can it still be done?
Is there another solution rather than load the bitmaps directly from harddisk using LoadFromFile()

Thanks,

Savant

 

Re:24bit colored bitmaps into resource files, how? (delphi5)


Do you not know how to create and compile and .RC file?
Do you already have your bitmaps saved as files?
If so...

Contents of MyBitmaps.RC FIle:

MYBITMAP  BITMAP "MyBitmapfile.bmp"
MYBITMAP2 BITMAP "MyBitmapfile2.bmp"
MYBITMAP2 BITMAP "MyBitmapfile2.bmp"

Compile to .RES like this:

brcc32 Mybitmaps.rc

Include in your project like this:

{$I MyBitmaps.RES}

And use LoadBitmap to load them into a TSpeedButton Glyph:
SpeedButton2.Glyph.Handle := LoadBitMap(hInstance,'MYBITMAP');

  Savant <Sav...@fibre.a2000.nl> wrote in message news:3a119dd9$1_1@dnews...
  Hi,

  I need for my component a few pre-stored / pre-loaded 24bit colored bitmaps in a (component)resource file.

  Image Editor only supports up to 256 colors....

  Can it still be done?
  Is there another solution rather than load the bitmaps directly from harddisk using LoadFromFile()

  Thanks,

  Savant

Re:24bit colored bitmaps into resource files, how? (delphi5)


Hi, Savant:

FWIW, the Team B guys don't like HTML posts.

You could store the bitmaps in resource files.

Loading Bitmaps and Cursors from RES files
http://community.borland.com/article/0,1410,16081,00.html

Find additional info about using Bitmaps in resouces files on these pages:

Under "BMP":
http://www.efg2.com/Lab/Library/Delphi/Graphics/FileFormatsAndConvers...

Under "Resources Files":
http://www.efg2.com/Lab/Library/Delphi/Graphics/Algorithms.htm

--
efg

Earl F. Glynn     E-mail:  e...@efg2.com
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

=================================================================

Quote
"Savant" <Sav...@fibre.a2000.nl> wrote in message news:3a119dd9$1_1@dnews...

Hi,

I need for my component a few pre-stored / pre-loaded 24bit colored bitmaps in a (component)resource
file.

Image Editor only supports up to 256 colors....

Can it still be done?
Is there another solution rather than load the bitmaps directly from harddisk using LoadFromFile()

Thanks,

Savant

Re:24bit colored bitmaps into resource files, how? (delphi5)


You can try our Resource Builder 1.0 from http://www.votum.md/sicmps/rb.htm
It allows to have 24bit bitmaps in resources and much more.

--
Best regards
Igor Siticov
ICQ: 15354432
siComponents home page: http://www.votum.md/sicmps
Get the powerful RC scripts visual editor from Resource Builder 1.0 home
page: http://www.votum.md/sicmps/rb.htm

Savant ??? a ???? <3a119dd9$1_1@dnews> ...
Hi,

I need for my component a few pre-stored / pre-loaded 24bit colored bitmaps
in a (component)resource file.

Image Editor only supports up to 256 colors....

Can it still be done?
Is there another solution rather than load the bitmaps directly from
harddisk using LoadFromFile()

Thanks,

Savant

Other Threads