Dim: Digital Image Mover by Alan Light
Dim: Digital Image Mover by Alan Light
Digital Image
Mover
Version 5
by Alan Light
This software is provided "as is" and the user assumes all risk associated with the use of this software.
Under no circumstance shall the author be liable for damages caused by this software.
This software is freeware and may not be sold, rented, or included as part of any commercial package.
This software may not be modified, reverse-engineered or disassembled.
The author grants you the permission to use this software but full ownership and
copyright remains with the author.
Table of Contents
Introduction...............................................................................................4
Storage Schemes......................................................................................5
Configuring DIM.........................................................................................12
Source Path................................................................................12
Target Path.................................................................................13
Path Pattern................................................................................13
Rename Pattern..........................................................................13
Suffix Separator..........................................................................18
Suffix Digits................................................................................18
Raw Processing..........................................................................18
Smart Copying............................................................................19
FILE Extensions..........................................................................21
create backup.............................................................................24
COUNTER Base...........................................................................25
Using DIM..................................................................................................26
Command-Line Arguments........................................................................27
Additional Information..............................................................................43
Getting DIM...............................................................................................44
Contact Info..............................................................................................45
2
Revision History........................................................................................46
Acknowledgments....................................................................................49
3
Introduction
What DIM is, what it’s good for, etc.
If you take more than just a few pictures with your digital camera, you
will quickly realize that you will need to come up with some sort of
organization scheme for the hundreds (and eventually thousands) of
digital image files that you will accumulate. Once you come up with this
scheme, you will want to be able to quickly and automatically get the
files onto the appropriate directories on your hard drive. That is where
DIM comes in.
DIM only does one thing, but it does it well: it copies files from your
camera’s memory card to a destination directory determined by your
storage scheme. If any directories need to be created in the process, it
will create them. In addition, the file can be renamed while it is copied
to a more “useful” name than your camera might have provided.
• Your storage scheme has some sort of rhyme and reason to it. In
other words you have a notion of a directory structure and you
pretty much follow it. See the section below on storage schemes
for further details.1
Usually DIM will just copy files to your computer and leave the original
files untouched. If you enable the Delete files from source after copying
option, the original files will be deleted after copying. This option is not
recommended and is discussed later in this document.
1
It's no problem if you have multiple, different storage schemes for different purposes. For example if you're a professional photographer, you
might want to file your client work by job and customer while filing your personal shots using a completely different scheme. This is quite possible.
See the section on the -c command-line option for using multiple configurations with DIM.
4
Storage Schemes
An explanation of Storage Schemes and some suggested examples.
My Documents
My Pictures
2000
2001
01
02
03
04
01APR2001
02APR2001
09APR2001
0409-01.jpg
0409-02.jpg
0409-03.jpg
0409-04.jpg
11APR2001
05
06
07
08
09
10
11
12
Files are named based on the date they were taken and then have a
sequence number to indicate the order in which they were taken. (e.g.
0409-01.jpg was taken before 0409-02.jpg).
5
An alternate scheme might look like this:
Stuff
2000
2001
01
02
03
04
05
06
07
Vacation-01.jpg
Vacation-02.jpg
Vacation-03.jpg
MarysWedding-01.jpg
MarysWedding-02.jpg
MarysWedding-03.jpg
MarysWedding-04.jpg
08
09
10
11
12
In this example we don’t have individual directories for each day. All the
pictures that were taken in a given month are stored together in a single
directory. The file naming convention in this case is different. Each file
is named based on the event or “job name” with a numerical suffix to
indicate the order in which the pictures were taken.
For a professional with various clients, a storage scheme might look like
this:
My Documents
My Pictures
Clients
Newsweek
RollingStone
SportsIllustrated
2003SuperBowl
2004KentuckyDerby
2003WorldSeries
1025-01.jpg
1025-02.jpg
1025-03.jpg
1025-04.jpg
Indy500
In this example, the shots are organized by client and then by jobs
within a given client.
In this example the shots are organized by state, then city and then by
month.
See the section later in this document for some more ideas for storage
schemes and DIM “recipes.”
• Scan your camera’s memory card for image files. This will be a
recursive scan, so you don’t have to worry if your camera creates
sub-directories on the memory card.
2
For those of you who are interested in the minutiae of EXIF processing, the specific field that is inspected is DateTimeDigitized. If this
does not contain a valid timestamp, the DateTimeOriginal field is used. You can explicitly instruct DIM to reverse this. For
details, see the Use EXIF “DateTimeOriginal Field” option, described later in this document.
3
Files typically have both a “creation time” and a “modified time”, DIM will inspect both of these and use whichever is earlier.
7
• Once the date and time the picture was taken is established, DIM
determines to what directory the file should be copied. This is
based on the date the picture was taken and your specific DIM
settings. If the directory needs to be created, DIM creates it.
• If you have chosen the option, the source file is deleted (after
verifying that the copy was successful).
8
Processing Video Files
How can I get DIM to process my video files?
You simply need to add the types of video files you want to process (for
example AVI or MOV) to the list of file types specified in the File Types to
Process option.
9
Using DIM to Reorganize
I have thousands of files and they are a mess, how can DIM help me?
A very common use of DIM besides copying images from your camera
right after you shoot them, is to use DIM to reorganize an existing
inventory of image files.
• Set your Source Path to the root of where your old, disorganized
image files are located. If your files are scattered in a number of
disparate locations, you will likely have to run DIM multiple times
to perform the reorganization. Note that when DIM scans a
source path for image files, it does a recursive scan, so if the files
are buried in sub directories, you only need to specify the root
directory, DIM will find any files buried below.
• Make sure that your Target Path is not under your Source Path.
• Make sure you have enough disk space available. You will
obviously need at least twice the space that the image files are
currently occupying.
• Give DIM time. If you are doing many thousands of files it can
take awhile.
• Do NOT ever use the Delete Files After Copying option when
performing a re-organization of this type.
10
Duplicate File Names
What DIM does when it encounters a duplicate file name.
Before DIM copies a file to your disk, it first checks to see if a file with
the same name already exists in the target directory. If no file exists, it
goes ahead and copies the file. If, however, a file with the target name
already exists, DIM will append a suffix to the file name to guarantee
uniqueness.
For example, suppose that you had a picture on your memory card that
was taken on September 15th, and that your naming scheme indicated
that it should be named 0915.jpg and copied to the C:\My
Pictures\2001\09 directory. What if there was already a file named
0915.jpg in that directory? Or, even more likely what if you took a
whole bunch of pictures on that day, they can’t all be called 0915.jpg.
If you would like the suffix to always be applied (regardless if the name
clashes or not), see the description of the Always Apply Suffix option
later in this document. If you had this option turned on, the three files
would be 0915-01.jpg, 0915-02.jpg and 0915-03.jpg.
11
Configuring DIM
How to make DIM work the way you want
When you run DIM for the fist time, you will need to set a few settings
on DIM's configuration screens. The main configuration options are in
the Configuration and More Configuration tabs. The third tab – Even
More Configuration contains options related to geotagging of shots and is
discussed in a separate section.
SOUR CE PATH
This is the file path that refers to your memory card. In other words,
this is where the files are copied “from.” This should be the root
directory of the drive to which your card reader or other device maps.
For example, on my computer when I plug-in my card reader, it appears
as the H: drive. So my source path is set as: H:\. When I process files,
DIM searches H:\ and all subdirectories for image files. You can either
type in the path or browse to it by clicking the little folder icon next to
the field.
12
If you are using a card reader, it will either have to be plugged in when
you configure DIM, or you will have to explicitly type the path name,
since you can’t browse to a directory that does not exist.
TARGET PATH
This is the root directory where your storage scheme begins (see section
above concerning storage schemes). This is usually C:\My
Documents\Pictures, or something similar. DIM will create the
appropriate subdirectories under this directory as needed. You can
either type in the path or browse to it by clicking the little folder icon
next to the field.
F IL E TYPES TO PROCES S
This is the list of filename extensions to process. Semicolons or commas
separate them. You will probably be processing JPEG files, which will
either have the extension JPG, JIF or JPEG. The specified extensions
are not case-sensitive. If you are dealing with raw files, see the section
later, which will explain how they can be given special handling.
PATH PATTER N
Use this to control the creation of target subdirectories according to
your chosen storage scheme.
See the section below for the symbols which are replaced in this
pattern. Any text other than the specified symbols will be left as-is in
the directory name.
As you edit the pattern, an example will be shown using today’s date.
RENAM E PATTERN
Similar to the Path Pattern above, but this is used for the target file
name instead of the directory. If you want to retain the original file
name as it came from the camera, see the use of the %o symbol below.
Note this applies to the “name” portion of the file name only, the
extension (e.g. “.jpg”) is not affected by the pattern.
13
%q Quarter of the year expressed as a single-digit number (1-4). Jan-
Mar are in the 1st quarter, Apr-Jun are in the 2nd quarter, etc. If
you would like to file your pictures by quarters within years, set
the path pattern to something like %Y\Q%q.
%C Model name of the camera which took this picture. This tag and
the previous one are particularly useful if you shoot pictures with
more than one camera and you wish to file them based on which
camera you used.
%O The name of the owner of the camera which took this picture. This
is useful if you are filing pictures taken by multiple photographers
and you wish to file them based on who took each picture. 5 One
way of doing this would be to set the path pattern to something
like %O\%Y. This would have the effect of creating a separate “root”
directory for each photographer.
4
Note that the actual abbreviation string (and its length) is specific to the language of your default locale. For example, in English the abbreviation
for the second month of the year is Feb, while in French it is FÉVR.
5
The %K, %C and %O symbols are replaced by data from the file’s EXIF header. Some cameras provide this data and some do not. In particular,
the %O (Owner Name) tag depends on having the owner’s name downloaded into the camera (usually by means of utility software provided by the
manufacturer). Consult your camera documentation to see if your camera supports this. If any of these fields are unavailable, they will be replaced
with an empty string. If any of these fields contain characters other than letters and digits, they will be replaced by an underscore (_).
14
%J Job name. Same as above, but can be used for tracking
individual jobs within a particular client.
The only characters allowed for client and job names are letters,
numbers, slashes, dashes, spaces and underscores.
• If you have the path pattern simply set to %J, then you are effectively filing your
pictures by event name, rather than by date. For example if you enter
Smiths_Wedding when prompted, a Smiths_Wedding subdirectory will be
created and all the pictures filed beneath it. If you shoot multiple memory cards
at the Smith wedding, simply make sure you enter the same job name when
prompted, and they will all be filed together.
• If you have clients that you do work for on an ongoing basis, set the path
pattern to something like %L\%Y\%M. You can then enter the client’s name
when prompted and the effect is that you will have a separate directory
hierarchy for each client.
• If you have the rename pattern set to %J, then your pictures will have the job
name and the suffix as file names. (e.g. Vacation-01.jpg, Vacation-02.jpg,
Vacation-03.jpg, etc.)
%h Name of the computer running DIM. Like the %N tag above this is
highly specific to your particular machine and operating system.
%o Original file name. This is the “root” of the original file name,
minus any extension (e.g. JPG, RAW, TIF, etc). This is useful if
the camera stores some information in the file name that you
would like to retain and is not available via one of the symbols
described above.
15
%[digits]c This is a special version of the %c symbol described
above. The only difference is that you can specify the minimum
number of digits for rendering the serial number. For example if
you use the symbol %4c in your pattern, the serial number will be
rendered as 4 digits (e.g. a serial number of 23 will be rendered as
the string 0023). This is useful if you are really picky about your
file names always having the same number of characters. You can
combine any combination of %c tags in the same pattern, but
that’s just silly.
%Gd The country where the shot was taken, expressed as a two-
character country code (e.g. US for the USA, GB for the United
Kingdom, CH for Switzerland, etc.)
%Gs If the shot was taken in the US, the two-character code for the
state where the shot was taken (e.g. CA for California, NY for New
York).
%Gc The name of the city where the shot was taken.
%Ga The latitude of the location where the shot was taken.
%Gn The longitude of the location where the shot was taken.
Note: If you are using any of the geographic related tags above, please
see the section later in the document related to DIM's handling of
geotagging for an explanation as to how to use these effectively.
6
For example, there is a municipality in Tennessee called “Metropolitan Government of Nashville, Davidson Balance”, which is probably a bit too
long to practically include in a file or directory name.
16
%[digit]P This gives access to the parent directory name of the
source file. It likely is only useful when using DIM to perform a
reorganization of files you already have stored and your current
directory structure has data you'd like to retain (see the section above
on using DIM to reorganize existing files). For example, let's say you had
an existing directory structure such as this:
Photography
Trips
Argentina
Italy
Rome
Florence
1025-01.jpg
1025-02.jpg
1025-03.jpg
Between the % and the P there needs to be a single digit from 1-9 which
represents the number of directory levels above the source file. A value
of 1 indicates the file's containing directory (“Florence” in the above
example), a value of 2 is the containing directory's parent (“Italy” in the
above example), etc.7
What I do, is have a pattern of %M%D and enable the Always Append
Suffix option (see below). This results in a nice sequence of file names
such as 0915-01.jpg, 0915-02.jpg and 0915-03.jpg. This has the
added benefit of keeping the filenames to less than 8 characters.
As you edit the patterns, an example will be shown using today’s date.
7
A super-secret feature is that you can use %0P to get the original file name (including the extension). This is not nearly as useful as using %o to
access the original file name without the extension.
17
AL WAYS APPL Y SUF F IX
If this is unchecked, the file name suffix will only be applied when a
duplicate file name is encountered.
What you chose is pretty much a stylistic thing and very much depends
on your renaming pattern. For example, if your renaming pattern
includes the hour/minute/second the picture was taken or you're using
the %c tag, you are unlikely to encounter very many duplicate file
names anyway.
SUF F IX DIGITS
The minimum number of digits to use for the suffix. This is useful if you
want all your file names to have the same number of characters.
RAW PROCESSI NG
Digital cameras which support Raw Format (CRW, CR2, NEF, etc.) and
video files (AVI files) also usually create a JPG file (the “cooked” file) to
go along with each raw or video file. If this box is checked, the raw files
and cooked files will always be moved together. This insures that the
two files will wind up in the same target directory and only differ by
their file name extension.
18
Since raw files do not contain any EXIF information and cooked files do,
the cooked file is used to determine the date/time that the picture was
taken.
If you enable raw processing, you will also need to specify the types of
files to be considered “raw” as well as the associated “cooked” file types
which go along with them. If you specify these file types here, it's not
necessary to list them again under file types to process.
Note: If you have a file type listed under as a raw type to process, DIM
assumes that it will be “paired” with a corresponding cooked file. If you
are ONLY processing raw files, then simply list the raw file type(s) under
file types to process and disable the Raw Processing option.
SM ART COPYI NG
This is a good option to use if you are not particularly diligent about
“cleaning up” files from your memory card after you have transferred
them to your computer.
For example, you take 10 pictures on day 1 and then you transfer them
to your computer (using DIM of course). You leave these pictures on
your memory card and then take 10 more pictures on day 2. You use
DIM again to transfer your pictures to your computer.
What would normally happen at this point is that both the day 1 and
day 2 pictures would be copied to your computer, the day 2 pictures for
the first time and then duplicates of the day 1 pictures (with the
duplicate file name processing as described earlier).
19
The Smart Copying feature attempts to remedy this problem. When
Smart Copying is enabled, before a file is copied DIM checks to see if
there is a file with the same name in the target directory and it also
checks to see if this file has the same content as the source file. If the
file has the same content and would wind up with the same name, DIM
skips the copying operation.
Be aware that the file would have to have the same target file name as
previously created for this feature to work. The Smart Copy operation
will be bypassed if you change the renaming pattern or if you delete or
rename any of your target files. The worst implication of this is that you
will wind up with some duplicate pictures.
Also note that the contents of the file must be exactly the same in order
for Smart Copy to skip it. If you copy a file and then modify it in the
camera, a subsequent run of DIM will result in the file being copied
again because as far as DIM is concerned, the files are no longer
identical8.
If you use this option, be warned that DIM’s processing will take longer,
because a potentially large number of files will have to be compared.
Selecting this option is pointless if you have also selected the delete files
from source after copying option.
In the case where your camera either does not generate files with EXIF
headers, or if the headers are in a non-standard format or location, DIM
will not be able to extract the timestamp from the header and will
always fallback to using the filesystem timestamp.
If this is the case with your camera, then you should check this option,
which tells DIM to not bother checking for an EXIF header and just use
the filesystem timestamp. This can speed up your performance.
8
In case you are interested, a CRC32 checksum is generated to compare the file contents.
20
F IL E EXTENSIO NS
This determines how to handle the extension of the image file (e.g. “.jpg”)
when the file is copied. You can either leave it as from the camera, or
force it to upper or lower-case when the file is copied.
If the above makes no sense to you, just leave this option unchecked
and you will be fine.
Note that this option obviously has no effect if you also have selected
the Skip EXIF Extraction option.
21
WRITE- PROTECT F IL ES AF TER COPYI NG
If this box is checked, DIM will write-protect the target files after copying
them. This is useful to help insure that you don’t accidentally erase or
modify the original files from the camera (which you should probably
regard the same way you treat the negatives from your film camera).
This option only applies to files copied to the target directory. Backup
files have their own option to specify write-protection.
If you do see DIM re-trying the copy process, then you likely have a
problem with your source or target media.
This option has no effect if the delete files from source after copying
option is selected, as that option always causes a verification to be
performed before the source file is deleted (see below).
You can use this option to have DIM “tidy up” your memory card after
each transfer, but this is not recommended. The problem with using
this option is the potential exposure to your computer failing.
However, if you were to enable this option and your system was to fail
right after a transfer, you are out of luck.
Unless you backup your picture archive immediately after each transfer
(and I’m sure you don’t), use this option with extreme caution.
22
Also note that the smart copying option becomes pointless if this option
is also selected.
If you select this option, the Show Confirm Process Dialog option,
becomes mandatory.
Suppose your source files are of several different types, such as:
abcdefg.jpg
xyzzy.jpg
qwerty.avi
zxcvb.avi
blahblah.tif
poiuy.tif
Further suppose that your storage scheme includes only the month and
day in the filename. If these files were all created on the same day and
you used DIM to copy them to your hard drive, they would end up with
names such as:
23
SEP15.jpg
SEP15-01.jpg
SEP15.avi
SEP15-01.avi
SEP15.tif
SEP15-01.tif
This is because DIM takes the entire filename into account when
determining if there is name clash and the suffix needs to be applied.
If you have this option checked, then only the root of the filename (not
the extension such as jpg, avi, etc.) is considered when determining if
filenames clash. The result of having this option checked for this
example would be:
SEP15.jpg
SEP15-01.jpg
SEP15-02.avi
SEP15-03.avi
SEP15-04.tif
SEP15-05.tif
CREATE BACKUP
If this option is selected, you can specify a second target directory and
DIM will copy your files there as well. This really only makes sense if the
backup directory is on a different drive than the primary target. This
will protect you from failure of a single drive.
You can separately specify write-protection for the backup files if you
desire.
All the other processing options (file renaming, etc.) apply to the backup
directory as well.
Bear in mind that selecting this option will greatly slow down DIM’s
processing, as two copies of each file will need to be made.
24
COU NTER BASE
The number used as a starting point for the %c symbol in file and
directory name patterns.
Simply set the threshold to some cutoff time in the early morning hours
which you would like to consider part of the previous day (such as
4:00am). Then set the offset to the number of hours you would like the
time “rolled-back” for those images which were shot earlier than this
threshold.
For example, if you have the threshold time set to 2:00am and the offset
set to 3 hours, a shot taken at 1:30am will be filed as though it was
taken at 10:30pm the previous day (1:30am minus three hours equals
10:30pm).9
• If you want to disable Night Owl Mode, set the threshold time to
midnight (12:00am).
9
Note that this only effects DIM's filing of your shot. The EXIF data encoded in the image is never modified.
25
Using DIM
Once you’ve configured DIM, how do you use it?
26
Command-Line Arguments
Optional ways of invoking DIM
-p
-c <configfile>
-L <clientname>
-J <jobname>
Specify a job name that will be used to replace %J in patterns. If you use
this option, you will not be prompted at runtime to enter the job name.
If none of your patterns contain a %J, then this argument has no effect.
-l <logdir>
If you'd like your log files written someplace other than your home
directory, you can specify an alternate log file directory.
10
You cannot reuse configuration files from versions of DIM prior to DIM 5. They are not compatible.
27
-Gd <country>
-Gs <state>
-Gc <city>
Specify a country, state or city for use in geotaging your photos. You will
need to turn off the Use Geographic Locations Database the Prompt for
Geographic Data and the Web Lookup options in order to insure that
these specified locations would be used for every file. See the section
below on DIM's geotagging support for further details.
28
DIM's Geotagging Support
How to use DIM to geotag your shots
One of the biggest new features in DIM 5 is the support for geotagging of
your shots. As shown above, there are the %Gd, %Gs and %Gc tags which
can be used in the path and file name patterns for specifying the
country, state and city where a shot was taken. In order for these tags
to work properly, DIM obviously needs to be able to determine the
location for a given shot. This section explains some of the ways that
DIM can accomplish this and the specific settings involved.
Identifying the city, state and country for a given shot involves two
discrete components:
1. For a given shot, determine the latitude and longitude where the shot
was taken.
29
GPX Tracking
If your camera is like most cameras (at least at the moment) and does
not include a GPS, you can leverage the GPS on your smartphone to
keep track of the locations where your camera shots where taken. You
do this by means of a “GPS tracking” application which you run on your
phone which will track your locations over time.11 These time/location
combinations can then be compared to the timestamps on your camera
images to help determine where a given image was taken. Typically the
GPS tracking application will log your location at a predefined interval
(usually about once a minute, but this is usually configurable) and write
the location and times to a file in a standard format which is known as
GPS Exchange or a GPX log file.
DIM can read these GPX files and match the time from the images in
your camera to the time and locations in the GPX file to determine the
location for a given image from your camera.
Note: While DIM can determine the location where a shot was made by
using GPX log data and use this data to file the image appropriately
given your choice of storage scheme, one thing that DIM does not do is
add the latitude and longitude information that it discovers to the file
itself. To do so would be to violate a fundamental operating principal of
DIM, which is to never modify a file's contents in any way. There are
other programs available which will take a GPX log file and use that to
11
The one I use is called GPS Logger for Android, but there are others available depending on your phone OS, etc.
30
inject latitude and longitude data into an image file. An alternate
approach would be to use one of these programs to tag your image files
with location data and then use DIM to file the shots just as if they
came from a smartphone with a GPS. An advantage of this would be
that the shots would end up with embedded location data. A
disadvantage would be that an extra step is involved.
Enable
If you want DIM to processes GPX tracking files, then check the Enable
checkbox under GPX Log Processing.
This is the directory where you store your GPX files and what you set it
to depends on how you get your GPX files from your phone to your
computer. DIM will process any and all GPX files that it finds in this
directory. The GPS logging app that I use on my phone has a nice
feature where it will automatically upload GPX log files to Dropbox, so
what I do is set this directory to the Dropbox directory where the GPX
files get uploaded.
Note that all GPX files found in this directory itself (not subdirectories)
will be processed by DIM and that GPX files must have a .gpx
extension in order to be recognized.
31
Time Threshold
The entries in your GPX log files will be logged at set intervals and of
course the shots you take with your camera will not exactly correspond
with the times in your GPX log file. This value is the maximum time
difference allowed between the timestamp on your image file from your
camera and the time in the GPX log file before they are considered a
“match.” For example if you have this value set to 15 minutes, and the
timestamp on your image file from the camera is 8:00pm, then the
closest GPX entry to 8:00pm between 7:45pm and 8:15pm will be
considered a “match” and the latitude and longitude from the GPX entry
will be used as the location for the image. If no GPX entry is found
within the time range, then no latitude/longitude will be associated with
the image via GPX, but the Magic Breadcrumb method (see below) can
still be applied.
Times in GPX log files are stored in GMT/UTC time and are converted to
local time when comparing times to the timestamps in your image files.
This is usually adequate provided that the clock in your camera is set to
the same timezone as your computer.
There may be circumstances where this is not the case. For example if
you are going on a trip to another timezone and you set the clock in
your camera to match the timezone of your destination. If this is the
case, the GPX timestamp to image file timestamp comparison will not
match. You can use this value to indicate the difference (either positive
or negative) between your camera's time and your computer's time.
Note: you can avoid this problem altogether by simply setting your
camera to your home time and just leaving it alone regardless of where
your travels may take you.
32
Inhibit GPX Match When Using non-EXIF Timestamp
Magic Breadcrumbs
If there is no latitude/longitude encoded in an image file and there is no
GPX data available to determine the image's location, there is another
alternative: Magic Breadcrumbs.
33
In order for this to work properly, in the case where you return from a
shooting session or trip where you used both your camera and your
smartphone, you will need to have DIM process the smartphone shots
prior to processing the camera shots. See the section below for tips on
using DIM effectively with a smartphone.
Enable
Check this box to turn on the use of Magic Breadcrumbs. This will
cause DIM to store timestamps and locations for those images that have
them and use these to attempt to determine the location of those images
that do not have a location encoded. DIM will store this “breadcrumb”
data in a file called dim_mbc.dat. The directory for this file will be
determined by the value of the Geo. Data Cache Directory (see below).
Time Threshold
See the description for this option above as it applies to GPX processing.
This operates in the same manner: this will prevent a non-EXIF file
timestamp from being used for a Magic Breadcrumb match.
34
The cache is stored in a file called dim_geoc.dat. The directory for this
file is determined by the value of the Geo. Data Cache Directory
configuration option.
Local Database
You can also create your own additions to this database by enabling the
Use Local Geographic Additions option and then specifying a file which
has your additions. The format for this file is tab-delimited text which
contains the latitude, longitude, country, state and city. For example13:
40.862778 -73.215278 US NY Smithtown
41.225556 -73.370556 US CT Weston
40.752800 -73.976522 US NY Manhattan
There are a few reasons why you might want to create your own local
additions:
• You want to add a small town which is not located in the local
database, to prevent DIM identifying the location as a nearby
larger city instead.
• Similarly, you might frequently take pictures in an area which
borders one town but is actually located in another. You can
create an entry for the correct location to “force” DIM to use it.
• You might want to use a local place name. The included database
has primarily English-language place names. For example the
large city in Austria is called Vienna in DIM's database, which
might be OK for an English-speaker but German speakers might
want to override the name to be Wien.
12
This data comes from www.geonames.org. DIM will build this database (from a raw data file included with DIM) the first time it's run. The
database will be stored in a file called geodata.dat and will be stored in the directory specified in the Geo. Data Cache Directory option (by
13
You should format your file exactly as illustrated including expressing the latitude and longitude to six decimal places. If you are including non-US
35
NOTE: When adding local database additions, DIM will check to see if
the local additions file is newer than DIM's geographic location cache. If
the local file is newer, DIM's cache will be cleared in order to ensure that
the local additions will actually take effect. A side-effect of this is that
there might be a performance degradation after creating a new bunch of
local additions until DIM can re-build its data cache.
Web Lookup
As mentioned above, DIM will use a built-in local database to find the
closet city to the point where an image was made. There are cases
where the closet city in the local database is not close enough to give a
desirable result. When this occurs, DIM can use a web-based lookup
using Google Maps to find the country/state/city for a given location.
Enable
Turns on the use of web lookup when the location discovered in the
local database is beyond a specified threshold distance (see below).
Distance Threshold
Note: In both the case where the local geographic database is used or
the case where the Google Maps API is used, the resulting city name will
have characters that are not legal for a file name removed and spaces
are replaced with underscores. So for example, Coeur d'Alene will
become Coeur_dAlene.
Default Location
Despite all of the above, there will be cases where DIM will not be able
to determine a location for an image. This can cause your storage to get
sloppy. For example if your storage scheme looks like this:
36
My Pictures
US
New_York_City
2001Sep15-001.jpg
2001Sep15-002.jpg
Boston
2012Dec12-001.jpg
2012Dec25-002.jpg
2012Dec25-003.jpg
Los_Angeles
and you take some shots on November 15 th at an indeterminate
location, they would end up getting filed at the wrong level of your
hierarchy, like this:
My Pictures
2012Nov15-001.jpg
2012Nov15-002.jpg
2012Nov15-003.jpg
US
New_York_City
2001Sep15-001.jpg
2001Sep15-002.jpg
Boston
2012Dec12-001.jpg
2012Dec25-002.jpg
2012Dec25-003.jpg
Los_Angeles
My Pictures
UN
Unknown
2012Nov15-001.jpg
2012Nov15-002.jpg
2012Nov15-003.jpg
US
New_York_City
2001Sep15-001.jpg
2001Sep15-002.jpg
Boston
2012Dec12-001.jpg
2012Dec25-002.jpg
2012Dec25-003.jpg
Los_Angeles
Simply check Enable under Default Location and enter your default
location values for country, state and city.
37
Prompt for Geographic Locations
If you have Prompt for Geographic Data checked, and Use Geographic
Locations Database and Web Lookup disabled, DIM will prompt the user
for city, state and country at run time, essentially handling the city,
country and state in the same manner as the job name and client
name.
38
Some DIM “Recipes”
Ideas for storage schemes and how to setup DIM
Here are a few ideas for storage schemes and how you would set DIM's
Path Pattern and Rename Pattern accordingly.
My Pictures
US
New_York_City
2001Sep15-001.jpg
2001Sep15-002.jpg
Boston
2012Dec12-001.jpg
2012Dec25-002.jpg
2012Dec25-003.jpg
Los_Angeles
GB
London
Bumbles_Green
My Pictures
2012
Aug
PA
Philadelphia
0001.jpg
0002.jpg
Intercourse
0001.jpg
0002.jpg
0003.jpg
Bird_In_Hand
MI
Detroit
Climax
39
By Date, City in Filename
This scheme creates directories for year and month and date and
embeds the city in the file name.
My Pictures
2012
Aug
10
Detroit-001.jpg
Detroit-002.jpg
Grand_Rapids-001.jpg
Grand_Rapids-002.jpg
Grand_Rapids-003.jpg
11
Madison-001.jpg
Madison-002.jpg
My Pictures
Time_Magazine
2012-01-20-001.jpg
2012-01-20-002.jpg
2012-01-20-003.jpg
CNN
Sports_Illustrated
2012-02-10-001.jpg
2012-02-10-002.jpg
Path Pattern: %L
Rename Pattern: %Y-%M-%D-%3c
By Photographer, Camera, Date, City with Client and Job File Name
This rather extreme example illustrates just how detailed DIM's storage
schemes can be.
My Pictures
Alan
EOS_10D
2012
May
15
Indianapolis
CNN-Indy500.jpg
40
DIM and Smartphones
Some tips on how to use DIM effectively with your smartphone
When DIM was first released in 2001, camera phones were still a few
years away. Now they are by far the most common means of digital
photography.
There are a few options for making your smartphone shots available for
DIM to process:
If you are using the first option, there really isn't much different for you
to do, if you are using the second option, here are some
recommendations for making the process easy for you:
14
If you use this method, you might want to also use the option that Dropbox provides which is to only upload when it detects a wifi connecction
(unless you're lucky enough to have an unlimited data plan for your phone).
41
This is one of the rare occasions where it would likely be preferable to
have DIM auto-delete the shots after processing as in this scenario you
still have the original shots on your phone.
If you do this, you are treating Dropbox as purely a literal “drop box”
which is just being used to hold the shots from your phone until you
have the chance to run DIM to file them.
If you are using the Magic Breadcrumbs feature described earlier in this
document, when you return from a shooting session, make sure you
use DIM to process the shots from your Phone/Dropbox before you
process your camera shots. This will insure that the geographic data in
your phone's images can be leveraged to geo-locate your camera shots.
42
Additional Information
Stuff you might need to know about DIM
• If you regularly use DIM to delete files from your memory card,
you should periodically reformat the card in your camera. This
will reduce fragmentation and increase reliability and
performance.
• This has nothing to do with DIM itself, but be aware that some
software will strip out EXIF header information from your files. Be
careful using any utilities that might modify the files on your
memory card prior to copying to your PC. If the EXIF header is
removed and the timestamp on the file is updated, DIM will be
unable to correctly determine when a picture was taken. Two
examples of programs with this nasty behavior are Photoshop
(pre 6.0) and the “rotate picture” feature of Windows XP Explorer.
15
Your home directory will vary depending on your operating system. On Unix/Linux systems it will be something like
/usr/home/YOURNAME, on Windows it will most likely be C:\users\YOURNAME, on a Mac, I have no idea (but if you are a Mac user,
presumably you would know).
43
Getting DIM
This all sounds great, but how can I download it?
http://digitalimagemover.tumblr.com
The latest version of DIM (plus this document) can be downloaded from
that page.
44
Contact Info
I have a question, comment, or suggestion, what should I do?
Keep it to yourself.
If you are having a problem, I’ll do my best to help, but I can’t promise
anything.
If DIM is not working as expected, the first place for you to look would
be DIM's log file. DIM writes a very detailed log file of everything it does
to a file called DIM_log.txt which will be found in your home
directory16. The last few versions of this log file are also kept, named
DIM_log.txt.1, DIM_log.txt.2, etc.
The latest version of the log file can be viewed by clicking the View Log
button:
If you email me with a problem, to make my life easier could you please
email me a copy of the log file. This will help me help you figure out
what's going on.
Privacy Warning:
Please note that this log file will contain information such as your user
name, home directory, operating system, places, dates and times of
geographic locations you've taken pictures, etc. Please do not send me
this file if you are at all concerned about me having this information.
16
Unless you use the -l command-line option to have DIM store the log file in an alternate location.
45
Revision History
January 2014 : Version 5.0 (Vince)
• Before copying a file, make sure the source and target paths are
different.
46
• Added option to only compare root of file name when checking for
name clash.
47
September 2001 : Version 1.0 (Rainbow)
• Initial Release.
48
Acknowledgments
Thanks to everybody who has suggested enhancements to DIM over the
past 13 years. DIM started out as a tool strictly for myself, since I could
not find a program of its kind that did exactly what I wanted. It’s nice to
see that it’s proven useful to others as well.
A very special thanks to those who were willing to spend the time and
test DIM for me.
49