Solved

bitmaps make my executable huge.

Posted on 1998-09-26
4
142 Views
Last Modified: 2010-04-06
I am writing a program that wil have about 1000 bitmaps throughout it. What is the best way to display the bitmap on each screen without swelling the size of my executable?
Cheers
Mike Ross
0
Comment
Question by:mykyl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
duke_n earned 100 total points
ID: 1340881
Hi.
you can create those images at runtime and load'em from the needed files:

public
bmp:timage
{ Public declarations }

....

procedure TForm1.Button1Click(Sender: TObject);
begin
bmp:=timage.Create(form1);//or another form
bmp.Parent:=form1;// ----------- // --------
bmp.AutoSize:=true;//here when it created you can also modify //other parameters like bmp.left and bmp.width
bmp.Picture.LoadFromFile('d:\pictures\bitmap.bmp');//or another //bitmap
end;

and dont forget to call bmp.free in Form1.onclose.

0
 
LVL 2

Expert Comment

by:333
ID: 1340882
You can add bitmaps to DLL, not to EXE, or you can use them as separate BMP files, by calling TImage.Picture.LoadFromFile('MyPicture.bmp');
0
 
LVL 2

Expert Comment

by:333
ID: 1340883
Sh*t, duke_n posted answer when i wrote my comment.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340884
You can also include them in a Resource file which I think is the best way since no one can exchange your bitmaps....Otherwise if you load the bitmaps from a file someone can change the bitmap and just change the name to be as the previous....

Regards,
Viktor Ivanov
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question