exif

I was trying sort out a large number of photographs today and wondered if there was any way of finding the origin of a photograph and came across something called exif....Never having heard of it before I tried pkg install -y exif and lo and behold a copy of graphics/exif appeared on my computer!

Isn't FreeBSD fantastic?!
 
The pkg seems to be fearure rich and it took me some find to work out how to this, but you can display which camera produced various photos using:-

exiftool "-Make" "-Model" *
 
Whit the default options x11-fm/thunar/ installs graphics/libexif/ you can right clic any picture Properties -> Image and get exif info:

thunarexif.png


Other file managers like caja and pcmanfm do the same. See the list of "required by" for libexif
 
I was just wondering if there was any way to view exif data from within misc/mc and there seems to be script called image.sh which can be invoked by pressing F3 on a jpg, but that doesn't seem to be included with the FreeBSD release.... Does anyone know if it does exist? Or could I use one from a Linux release?


..... a few minutes later.... actually the file does exist. I was misled by the error msg which popped up:-

Code:
│                                                 ┌────────────────────────── Error ──────────────────────────┐                                                                  │                                                    │
│                                                 │                                                           │                                            │       │            │
│                                                 │ /usr/local/libexec/mc/ext.d/image.sh: identify: not found │                                            │       │          │
│                                                 │                                                           │                                            │       │            │
│                                                 │                                                           │                                            │       │            │
│                                                 └───────────────────────────────────────────────────────────┘
 
Just read the script itself to see what it does, it's /usr/local/libexec/mc/ext.d/image.sh.
 
Now that I have become a little more familiar with exif data, I would like to convert the filenames of all my jpegs to the value of Date and Time from the exif data. Does anyone know of an existing script for changing the filename? It probably isn't too complicated, so I will have a go, but if something already exists, it would probably be better...
 
I would like to convert the filenames of all my jpegs to the value of Date and Time from the exif data. Does anyone know of an existing script for changing the filename?
Doesn't graphics/p5-Image-ExifTool has the means to do what you want? From exiftool(1):
Code:
RENAMING EXAMPLES
...
exiftool    '-FileName<CreateDate' -d %Y%m%d_%H%M%S%%-c.%%e    dir
        Rename all images in "dir" according to the    "CreateDate" date and
        time, adding a copy    number with leading '-'    if the file already
        exists ("%-c"), and    preserving the original    file extension (%e).
        Note the extra '%' necessary to escape the filename    codes (%c and
        %e)    in the date format string.
Also from exiftool(1):

http://owl.phy.queensu.ca/~phil/exiftool/filename.html

Notice the dry-run function TestName at example 0 before applying the command definitive on the original data.

Tip: It's always best to read the manual of the tool used. When the text is to long at least glance through, look if there is a example section, when seeking a function perform a keyword search. exiftool comes with dozens of man pages, see /usr/local/lib/perl5/site_perl/man/man3/Image::ExifTool::xxxxx, or run apropos ExifTool, the one or other might interest you.
 
Back
Top