16bit color from DLL?

Hi,
Using the image editor to build a res file so I can in turn put it into a DLL and call that DLL from my program only gives me a 256 color bmp. I would like to store 16 and 24bit color BMPs or JPGs in the DLL but do not know how.

Also, please include code to read that image from a dll into an application's tImage object as well as steps for creating such a DLL.

Thanks a lot.
MAXcomAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

intheCommented:
hi,
you should read this project :

How to create and use resource-only DLL's
This great tutorial is divided in two parts: the first one gives a detailed explanation on resource files, how to create them and how to create resource-only DLLs. Everything is well-documented with source code and a sample library. The second part is an application that will load the DLL created in the first part of the tutorial and use the several types of resources (Wave, AVI, cursor, ...) that the library contains... all with full, well-documented source code. The compiled resources and applications are also included.  

http://www.bhnet.com.br/~simonet/archive/resonlydll.zip

0
Stuart_JohnsonCommented:
Hi MAXcom,

Storing images different bitdepths is just as easy as storing one single image.  First, create your three images.  Call them (just an example) IMAGE8.BMP, IMAGE16.BMP and IMAGE24.BMP.  In your resource script, add the following text:

BITMAP 8  "IMAGE8.BMP"
BITMAP 16 "IMAGE16.BMP"
BITMAP 24 "IMAGE24.BMP"

Save the resource script as IMAGES.RC and compile it using BRCC32.EXE (found in Delphi's BIN directory).

Next, create an empty project (DPR) file.  I find using Notepad is the easiest way:

Library MultiImage;

{$R IMAGES.RES}

begin
end.

Save this file as MultiImage.dpr and compile it using DCC32.EXE (again found in the BIN directory).

This will create a DLL which contains all three images.

I am assuming you already know how to load the images into the TImage component, if not, just let me know.

Cheers,


Stu.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MadshiCommented:
Just one short hint: Use LoadImage instead of LoadBitmap. That gives you more control over the bitmap.

Regards, Madshi.
0
Stuart_JohnsonCommented:
Thanks, MAXcom.  Much appreciated.  Glad to help.

Stu.
0
MAXcomAuthor Commented:
thanks to YOU
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.