How to install ExifTool with Composer

Reply

I’m working on a PHP project, that uses Phil Harveys excellent ExifTool to read Exif and XMP tags from photos. Since ExifTool is written in Perl, there is of course no composer.json to install this dependency directly with Composer. But you can create your own package information in your master composer.json as follows:

{
    ...
    "repositories": [
        ...        
        {
            "type": "package",
            "package": {
                "name": "philharvey/exiftool",
                "version": "10.75",
                "dist": {
                    "url": "https://sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-10.75.tar.gz",
                    "type": "tar"
                }
            }
        }
    ],
    "require": {
        ...
        "philharvey/exiftool": "10.*"
    }
}

This will automatically download ExifTool version 10.75 and extract it into the vendor folder /vendor/philharvey/exiftool/

Note, that the package type ‘tar’ should extract the file completely. If that is not the case, make sure you have the latest composer version 1.6.2 installed. Some Linux distributions (e.g. Linux Mint 18.3 and probably Ubuntu 16.4 too) are still on version 1.0.0-beta2, which does not support extracting ‘tar.gz’. Read my quick tutorial on how to upgrade composer on Linux Mint 18.3.

 

How to create exif statistics for your photos

Reply

If you have Adobe Bridge, you can display statistics such as how many times you used a certain focal length or which ISO speeds you use the most.

Adobe Bridge Screenshot

Screenshot of the Filter Panel in Adobe Bridge

But what if you wanted to use this information in another application or post it on your blog? Unfortunately, Bridge doesn’t let you export that information (or at least I couldn’t figure out how), and not everyone can afford Photoshop with Bridge anyway.

ExifTool to the rescue

Don’t worry there are free tools to achieve the same or even better:

ExifTool by Phil Harvey is the most powerful tool to read, edit and write any metadata of your photos. It can extract even more information from your exif data than Adobe Bridge itself, especially for proprietary RAW formats such as Nikon’s NEF.

Together with the Exif Stats Utility it allows you to extract any technical information stored in your photos you can think of, e.g. which lens or exposure time you used the most.

Continue reading