Skip to content

Commit

Permalink
Merge pull request #205 from FrankBijnen/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
FrankBijnen authored Dec 24, 2023
2 parents b8c78c8 + b3fca44 commit 223e67e
Show file tree
Hide file tree
Showing 25 changed files with 586 additions and 342 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@

Source/Thumbs.db
Docs/ExifToolGUI_V6_files/Thumbs.db
60 changes: 32 additions & 28 deletions Docs/ExifToolGUI_V6.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<h1>ExifToolGUI for Windows v6.xx</h1><hr>
<h2>Introduction</h2>
In the summer of 2023 I decided to revive the ExifToolGui project initally created by <b>Bogdan Hrastnik</b>.
This revival resulted in <b>Version 6</b><br>
Read his complete documentation <a href="https://htmlpreview.github.io/?https://github.com/FrankBijnen/ExifToolGui/blob/Development/Docs/Original%20notes/ExifToolGUI_V516.htm"><b>here</b></a><br><br>
This was his intro, I will quote it now, because it still holds for me:<br><br>
<em>
Expand All @@ -27,7 +28,7 @@ The only downside for many potential users is the fact, that ExifTool is
(GUI), so all work must be done by typing commands inside "Command
Prompt" window. Such approach gives ExifTool great flexibility, but is
somehow difficult to use -especially for those, who don't use ExifTool
regulary.<br>
regularly.<br>
<br>

So, I've decided to make some simple ExifTool GUI for my private use.
Expand Down Expand Up @@ -56,15 +57,21 @@ Basic idea behind GUI is, to keep it <u>simple!</u> Thus, only those options are
<li>Better support for international characters. All internal code now uses Unicode (UTF16), to interface with Exiftool UTF8.</li>
<li>Enhanced Log Window. The last 10 commands are shown, with their respective output and error. Option to replay the command in PowerShell/Cmd prompt.</li>
<li>The external programs Jhead.exe and Jpegtran.exe are no longer needed. Rotation, and cropping, are handled in Delphi native code. With a modified library called NativeJpg by SimDesign B.V. (I tried contacting SimDesign to verify the Licence requirements, but was unable to.)</li>
<li>Exporting and Importing previews has been revised, and offer greater flexability.</li>
<li>Exporting and Importing previews has been revised, and offer greater flexibility.</li>
<li>GeoCoding has been enhanced. You can now choose from 2 providers (https://overpass-api.de and https://geocode.maps.co) and lookup City, Province and Country from GPS coordinates AKA reverse GeoCoding.</li>
<li>Option added to show folders in the FileList panel.</li>
<li>Option added to show a Breadcrumb (Address bar) in the FileList panel.</li>
<li>Possibility to add Custom options to Exiftool.</li>
<li>Experimental support for <a href="Readme%204K%20monitor.txt"><b>4K monitors.</b></a></li>
</ul>
<a href="changelog.txt"><b>See changelog.txt for a complete list of issues.</b></a>

<a name="m_reqs_general">
<h2>Requirements and preparations</h2>
ExiftoolGUI should run on Windows 7, 8 32-64bit. However, it is highly recommended to use Windows 10 or 11 when you plan to use the OSM map, or GEOcoding.<br>
It will not run on Windows XP or earlier!<br>

<a name="m_reqs_exiftool">
<h3>1. ExifTool</h3>
You only need to download the "Windows Executable" zip file from <a href="https://exiftool.org/"><b>here</b></a>.
After unzipping, depending on your Windows Explorer settings, you will see:<font color="CC0000">exiftool(-k)</font> or <font color="CC0000">exiftool(-k).exe</font>
Expand All @@ -80,7 +87,7 @@ If you want Windows to be able to always find ExifTool, then add the directory w
<li>In case you've done something wrong in this regard, you'll see an error message when GUI starts.</li>
</ul>

<h3>2. ExifToolGUI</h3>
<h3><a name="m_reqs_exiftoolgui">2. ExifToolGUI</h3>
You can download GUI from <a href="https://github.com/FrankBijnen/ExifToolGui/releases"><b>here</b></a>.
GUI doesn't need to be "installed". Just download the executable for your platform (ExifToolGui.exe or ExifToolGui_X64.exe) into any directory, create a Desktop shortcut and GUI is ready to use.<br>
<br>
Expand All @@ -98,7 +105,7 @@ It was decided not to save the INI file in the same directory as the executable,
</li>
</ul>

<h3><a name="m_edge">3. Edge browser needed for OSM map<a></h3>
<h3><a name="m_reqs_exiftoolgui"><a name="m_edge">3. Edge browser needed for OSM map<a></h3>
If you don't need the OSM map functionality, you can skip this step.<br>
The OSM map is hosted by an internal web browser based on Edge. There are 2 requirements. The <b>Edge Runtime</b> and the <b>WebView2Loader.dll</b>.

Expand Down Expand Up @@ -127,15 +134,14 @@ Extract the file 'runtimes\win-x86\native\WebView2Loader.dll' or 'runtimes\win-x
<a href="https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component">More info for developers from Embarcadero</a>
<br>

<h3>4. jhead.exe &amp; jpegtran.exe</h3>
These files are no longer needed, but can still be used if available.<br>
The menu-items that use these programs are marked <u>deprecated</u> and will be removed in a next release.</br>

<h3>5. Wish to see thumbnails of raw image files?</h3>
<h3>4. Wish to see thumbnails of raw image files?</h3>
Of course you do. What you need is a "raw codec", usually available for free from the camera manufacturer.
The best I've found so far is "FastPictureViewer codec" (from <a href="http://www.fastpictureviewer.com/codecs/">here</a>).
It is very fast, covers many raw formats and is free for personal use.<br>
<a href="Readme Using Codecs.txt"><b>Readme Using Codecs.txt</b></a>

<h3>5. jhead.exe &amp; jpegtran.exe</h3>
These files are no longer needed.<br>
<br>
<br>

Expand Down Expand Up @@ -249,7 +255,14 @@ If you check this, double-clicking in the Workspace will remove a tag,
double-clicking on one of the tabs Exif, Xmp, Iptc, Maker, All will add that tag to the Workspace.
<br><br>
<b>Exiftool.exe location</b><br>
If you need to override the location of exiftool.exe you can do that here.
If you need to override the location of exiftool.exe you can do that here.<br><br>
<b>Filelist: Show Folders in Filelist</b><br>
The default setting is to only show files in the Filelist panel. If you enable this option, also folders (directories) will be shown, allowing easier navigation.<br><br>
<b>Filelist: Show Breadcrumb (Address bar) in Filelist</b><br>
Enable a BreadCrumb bar on top of the filelist. Allows for easier navigating.<br><br>
<b>Hint pause timeout in Millisecs</b><br>
Hovering over the metadata panel will display the complete metadata value as a hint. This was added because long values are often not completely visible.<br>
Setting this value to 0 (zero) will effectively disable the hints.
<br><br>

<h3><a name="m_workspace">Workspace manager</a></h3>
Expand Down Expand Up @@ -391,7 +404,10 @@ next GUI start. Remaining options settings however, are only temporary

<h3>Group tag names by instance (-g4)</h3></font> -This can help you to identify duplicated tags when viewing in <font class="blue">Metadata</font> panel.<br>

<h3>API WindowsWideFile (requires Exiftool v12.66)</h3></font> -Force the use of wide-character Windows I/O functions when the CharsetFileName option is used.<br>
<h3>API WindowsWideFile (requires Exiftool v12.66)</h3> -Force the use of wide-character Windows I/O functions when the CharsetFileName option is used.<br>

<h3>Custom options</h3> -You can specify additonal options that exiftool should use. Expert option. Normally used with the Log Window.<br>
Possible use case is the option <b>-htmldump</b> and use the log window to catch the output.<br>
<br>
<br>
<h2><a name="m_exp_imp">Export/Import menu</a></h2>
Expand Down Expand Up @@ -540,16 +556,6 @@ cases, that will be the same folder where image files reside.</li>
...and that's it.<br>
<br>

<h3>Extract preview image from selected: raw files (Deprecated)</h3>
This function has been replaced by <b>Generic extract previews</b> and will be
removed in a next release.
<br>

<h3>Embed preview image into selected: raw files (Deprecated)</h3>
This function has been replaced by <b>Generic import preview</b> and will be
removed in a next release.
<br>

<h3>Generic extract previews</h3>
As you may know raw image files can also contain a JPG image, which serves for
previewing raw image file content. In most cases, this JPG image is "as
Expand Down Expand Up @@ -622,11 +628,6 @@ If you have a backup tool that relies on the Date Modified, it will not notice t
<img src="ExifToolGUI_V6_files/renamefiles.jpg"><br>
<br>

<h3>JPG: Lossless autorotate (Deprecated)</h3>
This menu still uses external program jhead.exe. (if available) But will be removed in a next release. Use the next menu-item.<br>
<br>
<br>

<h3>JPG: Lossless autorotate + crop</h3>
This will physically rotate selected JPG images according to Exif:Orientation value inside files.<br>
It uses a library NativeJpg by SimDesign B.V. to do the actual rotating. No external program is needed.<br>
Expand Down Expand Up @@ -661,7 +662,9 @@ appropriate raw "codec", to be able to see thumbnails and previews.<br>
<br>

<b>Details</b> drop-down box<br>
-is set to <font class="blue">Standard filelist</font> by default. This drop-down box also contain few predefined details views: <font class="blue">Camera settings, Location info</font> and <font class="blue">About photo</font> -where each of these views shows few metadata values inside files; i.e.:<br>
-is set to <font class="blue">Standard filelist</font> by default. This drop-down box also contain few predefined details views:<br>
<font class="blue">Camera settings, Location info</font> and <font class="blue">About photo</font> -where each of these views shows few metadata values inside files; i.e.:<br>
<u><b>Note:</b></u> The Folders and the Breadcrumb bar are shown only when enabled in Preferences/Other.<br>
<img src="ExifToolGUI_V6_files/filelistcamerasettings.jpg"><br>
<br>

Expand Down Expand Up @@ -995,14 +998,15 @@ P.S.: Don't blame me for my English grammar -it's not my native language.<br>
</em>
<br>
Frank<br>
Modified on November, 2023<br>
Modified on December, 2023<br>
<br>

<u>You may find additional info in the ReadMe files:</u>
<ul>
<li><a href="ReadMe for Developers.txt">ReadMe for Developers</a></li>
<li><a href="..\Source\Vcl.ShellControls\ReadMe.txt">ReadMe ShellControls</a></li>
<li><a href="..\Source\NativeJpg\README.txt">ReadMe NativeJpg</a></li>
<li><a href="..\Source\BeadcrumbBar\README.txt">ReadMe Breaddcrum Bar</a></li>
<li><a href="ReadMe for Users.txt">ReadMe for Users</a></li>
<li><a href="Readme GeoCoding.txt">Readme GeoCoding</a></li>
<li><a href="Readme Long filenames.txt">Readme Long filenames</a></li>
Expand Down
Binary file removed Docs/ExifToolGUI_V6_files/Thumbs.db
Binary file not shown.
Binary file modified Docs/ExifToolGUI_V6_files/filelistcamerasettings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/ExifToolGUI_V6_files/gui_screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/ExifToolGUI_V6_files/preferences_other.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion Docs/ReadMe for Developers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Adding reverse geocoding involved adding a 2nd provider: Overpass. The simple so
I do agree it would be better to create classes and subclasses. We'll leave that for a next release.

To finally resolve the issue that ExifToolGui would hang, because the ExifTool cmd was not terminated by a CRLF, I decided to add a CRLF in ET_OpenExec if it does not end with a CRLF.
Note that in stead of a CRLF, a bare LF will also work, but I decided to leave that as-is.
Note that instead of a CRLF, a bare LF will also work, but I decided to leave that as-is.

When looking at the original code to format the output of ExifTool I figured it needed an overhaul. So I created TPipeStream in Exiftool_PipeStream.pas.
TPipeStream handles: Conversion to UTF8, Scanning for {Ready..., Scanning for ======= (it indicates a new file) and uses an event to communicate.
Expand Down Expand Up @@ -68,5 +68,11 @@ Surely this is not the end....
A few new units, and forms were added.

And various fixes like: generating Thumbnails, selecting a directory while the shelllist is sorted, etc. See also: https://github.com/FrankBijnen/ExifToolGui/issues/118

Version 6.2.7.

Option to add folders (Directories) to the filelist.
Option to enable the control BreadCrumbBar by Andreas Rejbrand. You can find the source in the subdirectory BreadbrumbBar.
Added experimental support for 4K monitors. See UnitScaleForm.pas and UnitDpiAwareness.pas

Frank
18 changes: 18 additions & 0 deletions Docs/ReadMe for Users.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,22 @@ Changed with version 6.2.5
- Various small fixes, for bugs encountered when testing.
If you find a bug, or think you found one, dont hesitate to report. You can create an issue on Github (https://github.com/FrankBijnen/ExifToolGui/issues) or post on the ExifTool forum (https://exiftool.org/forum/index.php?board=7.0).

Changed with version 6.2.6
- The documentation has been updated to reflect the changes from V516 to V626. You can access it from the program via 'Help/Online documentation', or by using this link:
https://htmlpreview.github.io/?https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md

Changed with version 6.2.7
- Added the option to show folders (Directories) in the filelist. No Metadata/Image functions are available on the folders.
- Added the option to show a Breadcrumb (Address bar)in the filelist.
Both options can be dis/enabled in Preferences/other and only serve for easier navigation.
- Some fixes for styles were applied. Especially the style 'Green' was updated, it had some colours wrongly defined and the caption bar was ugly.
- Added a hint window for the metadata values. It can be disabled in Prefrences/Other by setting the timeout value to 0.
- Added the option to add Custom Options to Exiftool. Not needed for Normal usage.
If you want to experiment: Add the option '-htmldump'. (without the quotes) Open the log window, and check 'Show all commands'. Select any file.
Dont forget to remove the option afterwards!
- Fixed an error message in the generated Powershell script. It would always show the error 'Native Command Error'.
- Fixed an error message in the generated Powershell script. It would always show the error 'Native Command Error'.
- Added experimental support for 4K monitors. Or better: Monitors with a non-standard resolution or scaling.
If you want to experiment with this see: Readme 4K monitor.txt in the Docs directory.

Frank
54 changes: 54 additions & 0 deletions Docs/Readme 4K monitor.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Notes on using 4K (HighDpi) monitors.

Issue #199 tries to improve 4K support.
The problem with 4K monitors is that they typically have a higher DPI than 96, the DPI ExifToolGui is designed for.
The result could be that items look too small, or not correctly positioned, or even be unreadable.

Previous versions of Delphi used scaling to overcome that. The problem with scaling is that items could be blurry.
Recent Delphi versions support the Windows HighDpi Api. (E.g. Via Manifest or API SetProcessDpiAwareness, SetProcessDpiAwarenessContext)

As of version 6.2.7 this solution is implemented in ExiftoolGui:

- Scaling is turned off by default, but can be re-enabled with the command line parameter /Scale.

- DPI Awareness.

Below Window 8.1
- No calls are made to set DPI Awareness.

Windows 8.1 or higher
- SetProcessDpiAwareness(TProcessDpiAwareness.PROCESS_SYSTEM_DPI_AWARE)
see: https://learn.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-process_dpi_awareness

Windows 10 1703 or higher
- SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE)
see: https://learn.microsoft.com/en-us/windows/win32/hidpi/dpi-awareness-context

Notes:
- Microsoft states that is recommended to use a Manifest instead of the API's, but then it would not be easy to switch at runtime.
- The API's have to be called very early, and only once, at startup.
- You can override the settings in the shortcut. Properties/Compatibility/Change high DPI settings.
- To help troubleshoot any problems the following command line parameters are introduced to override the default behaviour:

/Scale Turn on Scaling for all forms.

Valid for Windows 10 1703 or higher:
/HighDPI=UnAware SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE)
/HighDPI=SystemAware SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE)
/HighDPI=PerMonitorAware SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE)
/HighDPI=PerMonitorAwareV2 SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)
/HighDPI=UnAwareGDIScaled SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)

Valid for Windows 8.1 or higher:
/HighDPI=UnAware SetProcessDpiAwareness(TProcessDpiAwareness.PROCESS_DPI_UNAWARE)
/HighDPI=SystemAware SetProcessDpiAwareness(TProcessDpiAwareness.PROCESS_SYSTEM_DPI_AWARE)
/HighDPI=PerMonitorAware SetProcessDpiAwareness(TProcessDpiAwareness.PROCESS_PER_MONITOR_DPI_AWARE)

The reasons for using command line parameters instead of adding options in preferences:
- They are hopefully only temporary. The long term solution is to use the manifest.
- The preferences are read too late. A window handle is already created.

The problem that I face is that I dont own a 4K monitor, so it's very hard to test. I can only test a lower DPI.
Anyone with such a monitor willing to help? Create an issue on Github with your testresults. https://github.com/FrankBijnen/ExifToolGui/issues

Frank
8 changes: 8 additions & 0 deletions Docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ Version: Description Issue
Fix Issue #189 Style fixes for Green
Fix Issue #191 Add Custom options
Fix Issue #195 Add Breadcrumb bar. If folders are allowed to show
Fix Issue #197 Fix issues for V6.2.7
- Resizing issues
- Remove deprecated functions Jhead and Jpegtran
- Update docs
Fix Issue #199 Experimental support for 4K monitors
Fix Issue #202 Window opens very small on Win11 with x64 build
Fix Issue #203 Preview cuts off part of images
Fix Issue #204 Request: Make 'BreadCrumBar' a standalone option in Preferences
Loading

0 comments on commit 223e67e

Please sign in to comment.