Das Problem besteht leider immernoch.
Es müsste an folgender Function liegen:
Delphi-Quellcode:
function TForm1.GetPicPanelformat(pic: string): boolean;
var jpeg: TJPEGImage;
bmp: TBitmap;
isjpeg: boolean;
begin
if (GetFileExt(pic) = '.jpg') or (GetFileExt(pic) = '.jpeg') then
isjpeg := true else
isjpeg := false;
if isjpeg then
begin
jpeg := TJPEGImage.Create;
try
jpeg.LoadFromFile(pic);
if jpeg.Width > jpeg.Height then
result := false else
result := true;
finally
FreeAndNil(jpeg);
end;
end else
begin
bmp := TBitmap.Create;
try
bmp.LoadFromFile(pic);
if bmp.Width > bmp.Height then
result := false else
result := true;
finally
FreeAndNil(bmp);
end;
end;
end;