mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Optimization, refactoring
This commit is contained in:
parent
b3f06168fa
commit
69a8ec935f
1 changed files with 7 additions and 8 deletions
|
|
@ -330,19 +330,18 @@ begin
|
|||
AOptions:= heif_decoding_options_alloc();
|
||||
AVersion:= AOptions^.version;
|
||||
heif_decoding_options_free(AOptions);
|
||||
if (AVersion < 2) then raise Exception.Create('HEIF: Old version');
|
||||
|
||||
if (AVersion < 2) then
|
||||
// Register image handler and format
|
||||
ImageHandlers.RegisterImageReader ('High Efficiency Image', HEIF_EXT, TDCReaderHEIF);
|
||||
TPicture.RegisterFileFormat(HEIF_EXT, 'High Efficiency Image', THighEfficiencyImage);
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
DCDebug(E.Message);
|
||||
FreeLibrary(libheif);
|
||||
libheif:= NilHandle;
|
||||
end
|
||||
else begin
|
||||
// Register image handler and format
|
||||
ImageHandlers.RegisterImageReader ('High Efficiency Image', HEIF_EXT, TDCReaderHEIF);
|
||||
TPicture.RegisterFileFormat(HEIF_EXT, 'High Efficiency Image', THighEfficiencyImage);
|
||||
end;
|
||||
except
|
||||
on E: Exception do DCDebug(E.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue