1 <?xml version="1.0" encoding="utf-8"?>
\r
2 <section id="GuideOptionsAdvanced">
\r
3 <title>Advanced</title>
\r
4 <section id="ExternalPreviewExtraction">
\r
5 <title>External preview extraction</title>
\r
7 The intention of this feature is to give the user the possibility to display image previews of files
\r
8 that the standard libraries cannot decode.
\r
10 An example is the .dng files produced by LG V30 cameras. Neither
\r
15 extract a preview, but the command line program
\r
19 This feature allows a work-around until the standard libraries provide a solution.
\r
21 Two command files are required: one to identify which files to process, and one to extract or decode the preview image.
\r
23 The format for the identification tool is:
\r
26 <programlisting xml:space="preserve">
\r
27 Parameter 1: (input) full path name to the current image.
\r
29 Returns: 0 for file match, any other value for no match.
\r
33 The format for the extraction tool is:
\r
36 <programlisting xml:space="preserve">
\r
37 Parameter 1: (input) full path name to the current image.
\r
39 Parameter 2: (output) a temporary file name generated by Geeqie. The tool should load this file with the decoded image.
\r
45 This is an example of an identification tool using a shell script:
\r
48 <programlisting xml:space="preserve">#! /bin/bash
\r
50 filename=$(basename -- "$1")
\r
51 extension="${filename##*.}"
\r
53 shopt -s nocasematch
\r
54 if [[ $extension == "DNG" ]]
\r
56 cameramodel=$(exiv2 -K Exif.Image.UniqueCameraModel -Pt "$1" )
\r
57 if [[ $cameramodel == "LG-H930" ]]
\r
69 This is an example of an extraction/decode tool using a shell script:
\r
71 <programlisting xml:space="preserve">#! /bin/bash
\r
72 dcraw -e -c "$1" > "$2"</programlisting>
\r
77 <programlisting xml:space="preserve">#! /bin/bash
\r
78 gm convert "$1" "$2"</programlisting>
\r
82 If the decode tool requires an output file with a particular extension, use this method:
\r
84 <programlisting xml:space="preserve">#! /bin/bash
\r
85 tmpfile=$(mktemp --tmpdir=$tempdir geeqie_tmp_XXXXXX.jpg)
\r
86 gm convert "$1" $tmpfile
\r
87 mv $tmpfile "$2"</programlisting>
\r
91 <section id="ThreadPools">
\r
92 <title>Thread Pools</title>
\r
93 <para>This option will limit the number of threads (cores) that are used when performing a duplicate image search. A value of <code>0</code> means use all available threads. This will give the fastest processing time, but will slow other processes including user input response time.</para>
\r