mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 03:48:27 +02:00
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:
parent
18c9e1f4f3
commit
2b1ccdaa38
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user