Solved

Picture-formats other than BMP?

Posted on 1998-09-10
4
247 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 20 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now