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