lcl: improve TPicture.LoadFromFile - if there is no extension then detect the file format based on file content (issue #0018453)

git-svn-id: trunk@28943 -
This commit is contained in:
paul 2011-01-11 02:45:12 +00:00
parent 18c9e1f4f3
commit 2b1ccdaa38

View File

@ -511,7 +511,10 @@ begin
Stream := TFileStream.Create(UTF8ToSys(Filename), fmOpenRead or fmShareDenyWrite);
try
LoadFromStreamWithFileExt(Stream, ext);
if Ext <> '' then
LoadFromStreamWithFileExt(Stream, Ext)
else
LoadFromStream(Stream);
finally
Stream.Free;
end;