Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Picture-formats other than BMP?

Posted on 1998-09-10
4
Medium Priority
?
272 Views
Last Modified: 2013-11-19
How can I view some pictures (in Delphi3), others than BMP-files? I want to put some different pictures (different formats) in an image-box. Thanx. Jan van Barchum.
0
Comment
Question by:roosiedb
  • 2
4 Comments
 
LVL 4

Expert Comment

by:erajoj
ID: 1339263
What formats are you looking for?
JPEG, ICO, WMF, EMF is already available, just take a look in the help file.

/// John
0
 
LVL 1

Accepted Solution

by:
duke_n earned 80 total points
ID: 1339264
I know how to insert *.jpg without any additional components needed to install.
Just include JPEG in uses list and then call Timage.picture.loadfromfile.
Like this:


unit Unit1;

interface

uses
  Windows,JPEG{!!!}, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,Buttons, ExtCtrls;

type
  TForm1 = class(TForm)
    Image1: TImage;
    SpeedButton1: TSpeedButton;
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
image1.Picture.LoadFromFile('myjpeg.jpg');
end;

end.

0
 
LVL 4

Expert Comment

by:d003303
ID: 1339265
There are also GIF extensions for TPicture available on the DSP.

Slash/d003303
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1339266
Yes, there is. The reason I didn't mention it, is because
you need a license from UNISYS in order to use it's LZW compression algorithm commercially.

See http://corp2.unisys.com/LeadStory/lzwfaq.html

/// John
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this Micro Tutorial viewers will learn the basic shortcuts and functions of Illustrator. The viewer will learn about the paintbrush tool, anchor points, font sizing, and more.
Not only does Prezi allow you to create non-linear presentations, it also makes it easy to apply transition animations between your frames. Learn how to apply a fade-in transition to select items and entire frames in this tutorial Select "Edit Path"…
Suggested Courses

886 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