unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtDlgs, ExtCtrls, pngimage, jpeg, gifimg;
type
TForm1 =
class(TForm)
Image1: TImage;
Button1: TButton;
OpenDialog1: TOpenDialog;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if OpenDialog1.execute
then
begin
if pos('
.CR2', uppercase(openDialog1.FileName)) > 0
then
Image1.Picture.RegisterFileFormat('
CR2','
CR2 Format',TWICImage)
else if pos('
.DNG', uppercase(openDialog1.FileName)) > 0
then
Image1.Picture.RegisterFileFormat('
DNG','
DNG Format',TWICImage);
// for bmp, jpg, gif, tif, png do nothing but simply
Image1.Picture.LoadFromFile(openDialog1.FileName);
end;
end;
end.