Hi,
versuch mal folgendes:
Delphi-Quellcode:
procedure TForm1.BildLaden(BDName: String; BMP: TBitmap32);
var JPG: TJpegImage;
TmpBMP: TBitmap32;
begin
TmpBMP := TBitmap32.Create;
try
if ((AnsiLowerCase(ExtractFileExt(BDName)) = '.jpg') or (AnsiLowerCase(ExtractFileExt(BDName)) = '.jpeg')) then
begin
JPG := TJpegImage.Create;
try
JPG.LoadFromFile(BDName);
TmpBMP.Assign(JPG);
finally
FreeAndNil(JPG);
end;
end
else if (AnsiLowerCase(ExtractFileExt(BDName)) = '.bmp') then
TmpBMP.LoadFromFile(BDName);
//TmpBMP.SetSize(188, 142);
BMP.Assign(TmpBMP);
finally
FreeAndNil(TmpBMP);
end;
end;
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
//Aufruf
BildLaden('C:\\alba.jpg', Image321.Bitmap);
Paint;
end;
hast du ne lösung für den schwarzen hintergrund??? wie krieg ich den weiss???