Solved

bitmaps make my executable huge.

Posted on 1998-09-26
4
144 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

617 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