mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Exif-wdx - use non-localized field names for storage
This commit is contained in:
parent
74b3763c56
commit
46c39f0024
3 changed files with 42 additions and 18 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Simple exchangeable image file format reader
|
||||
|
||||
Copyright (C) 2016-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2016-2024 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -74,13 +74,21 @@ type
|
|||
property DateTimeOriginal: TDateTime read FDateTimeOriginal;
|
||||
end;
|
||||
|
||||
const
|
||||
cMake = 'Manufacturer';
|
||||
cModel = 'Camera model';
|
||||
cImageWidth = 'Width';
|
||||
cImageHeight = 'Height';
|
||||
cOrientation = 'Orientation';
|
||||
cDateTimeOriginal = 'Date taken';
|
||||
|
||||
resourcestring
|
||||
rsMake = 'Manufacturer';
|
||||
rsModel = 'Camera model';
|
||||
rsImageWidth = 'Width';
|
||||
rsImageHeight = 'Height';
|
||||
rsOrientation = 'Orientation';
|
||||
rsDateTimeOriginal = 'Date taken';
|
||||
rsMake = cMake;
|
||||
rsModel = cModel;
|
||||
rsImageWidth = cImageWidth;
|
||||
rsImageHeight = cImageHeight;
|
||||
rsOrientation = cOrientation;
|
||||
rsDateTimeOriginal = cDateTimeOriginal;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Simple exif-wdx plugin.
|
||||
|
||||
Copyright (C) 2016-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2016-2024 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
|
@ -89,12 +89,12 @@ end;
|
|||
|
||||
procedure TExifWdx.CallContentGetSupportedField;
|
||||
begin
|
||||
AddField(rsMake, ft_string);
|
||||
AddField(rsModel, ft_string);
|
||||
AddField(rsImageWidth, ft_numeric_32);
|
||||
AddField(rsImageHeight, ft_numeric_32);
|
||||
AddField(rsOrientation, ft_numeric_32);
|
||||
AddField(rsDateTimeOriginal, ft_datetime);
|
||||
AddField(cMake, rsMake, ft_string);
|
||||
AddField(cModel, rsModel, ft_string);
|
||||
AddField(cImageWidth, rsImageWidth, ft_numeric_32);
|
||||
AddField(cImageHeight, rsImageHeight, ft_numeric_32);
|
||||
AddField(cOrientation, rsOrientation, ft_numeric_32);
|
||||
AddField(cDateTimeOriginal, rsDateTimeOriginal, ft_datetime);
|
||||
end;
|
||||
|
||||
procedure TExifWdx.CallContentSetDefaultParams;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
(TC WDX-API v1.5)
|
||||
|
||||
Copyright (C) 2008 Dmitry Kolomiets (B4rr4cuda@rambler.ru)
|
||||
Copyright (C) 2008-2023 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2008-2024 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
Some ideas were found in sources of WdxGuide by Alexey Torgashin
|
||||
and SuperWDX by Pavel Dubrovsky and Dmitry Vorotilin.
|
||||
|
|
@ -215,7 +215,7 @@ type
|
|||
procedure SetAName({%H-}AValue: String); override;
|
||||
procedure SetAFileName({%H-}AValue: String); override;
|
||||
protected
|
||||
procedure AddField(const AName: String; AType: Integer);
|
||||
procedure AddField(const AName, XName: String; AType: Integer);
|
||||
public
|
||||
//---------------------
|
||||
constructor Create; override;
|
||||
|
|
@ -224,6 +224,7 @@ type
|
|||
procedure UnloadModule; override;
|
||||
function IsLoaded: Boolean; override;
|
||||
//---------------------
|
||||
function GetFieldIndex(FieldName: String): Integer; override;
|
||||
end;
|
||||
|
||||
{ TWDXModuleList }
|
||||
|
|
@ -1276,7 +1277,7 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TEmbeddedWDX.AddField(const AName: String; AType: Integer);
|
||||
procedure TEmbeddedWDX.AddField(const AName, XName: String; AType: Integer);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
|
|
@ -1284,7 +1285,7 @@ begin
|
|||
with TWdxField(FFieldsList.Objects[I]) do
|
||||
begin
|
||||
FName := AName;
|
||||
LName := FName;
|
||||
LName := XName;
|
||||
FType := AType;
|
||||
end;
|
||||
end;
|
||||
|
|
@ -1310,6 +1311,21 @@ begin
|
|||
Result:= True;
|
||||
end;
|
||||
|
||||
function TEmbeddedWDX.GetFieldIndex(FieldName: String): Integer;
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
Result:= inherited GetFieldIndex(FieldName);
|
||||
if Result < 0 then
|
||||
begin
|
||||
for Index:= 0 to FFieldsList.Count - 1 do
|
||||
begin
|
||||
if AnsiSameText(FieldName, TWdxField(FFieldsList.Objects[Index]).LName) then
|
||||
Exit(Index);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TWDXModule }
|
||||
|
||||
procedure TWDXModule.Translate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue