Skip to content

Instantly share code, notes, and snippets.

@sps sps/
Last active Dec 19, 2015

What would you like to do?
script for adding EXIF camera info for flickr
# Copyright (c) 2006 Sean P. Scanlon <sean.scanlon <-AT->>
# All rights reserved.
use strict;
use Getopt::Long;
use Image::MetaData::JPEG;
my %opt = ();
GetOptions(\%opt, 'file=s', 'make=s', 'model=s');
foreach (qw(file make model)) {
if (! $opt{ $_ } ) {
print "$0: --file=file.jpg --make=Kodak --model=Hawkeye\n";
# Create a new JPEG file structure object
my $file = new Image::MetaData::JPEG($opt{file});
die 'Error: ' . Image::MetaData::JPEG::Error() unless $file;
$file->set_Exif_data({Make => [$opt{make}], Model => [$opt{model}]}, 'IFD0_DATA', 'ADD');
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.