App-CopyrightImage

 view release on metacpan or  search on metacpan

bin/imgcopyright  view on Meta::CPAN

#!/usr/bin/perl
use warnings;
use strict;

use App::CopyrightImage;
use Getopt::Long;

my %opts;

GetOptions(
    "i|image=s" => \$opts{src},
    "c|check"   => \$opts{check},
    "n|name=s"  => \$opts{name},
    "e|email=s" => \$opts{email},
    "d|dst=s"   => \$opts{dst},
    "r|remove"  => \$opts{remove},
    "f|force"   => \$opts{force},
);

my %err = imgcopyright(%opts);

for my $k (sort keys %err){
    print "$k: $err{$k}\n";
}
1;
__END__

=head1 NAME

imgcopyright - Easily add copyright information to your images

=for html
<a href="http://travis-ci.org/stevieb9/p5-app-copyrightimage"><img src="https://secure.travis-ci.org/stevieb9/p5-app-copyrightimage.png"/></a>
<a href="https://ci.appveyor.com/project/stevieb9/p5-app-copyrightimage"><img src="https://ci.appveyor.com/api/projects/status/br01o72b3if3plsw/branch/master?svg=true"/></a>
<a href='https://coveralls.io/github/stevieb9/p5-app-copyrightimage?branch=master'><img src='https://coveralls.io/repos/stevieb9/p5-app-copyrightimage/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>

=head1 SYNOPSYS

Modified copy of images will be placed into a new C<ci> directory within the
directory you specify. If no directory is specified, we'll create it in the
current working directory. All new images will be prefixed with C<ci_>.

    # set copyright

    imgcopyright -i picture.jpg -n "Steve Bertrand" -e "steveb@cpan.org"

    # all pics in a directory

    imgcopyright -i /home/user/Pictures -n "Steve Bertrand"

    # find images without copyright info

    imgcopyright -i /home/user/Pictures -c

    # specify an alternate output directory

    imgcopyright -i /home/user/Pictures -n "steve" -d ~/mypics

    # replace a previous copyright

    imgcopyright -i picture.jpg -n "steve" -f

=head1 DESCRIPTION

This C<imgcopyright> application allows you to add copyright information to
the EXIF data within image files. It also allows you to check images for
missing copyright info and remove info.

It works on individual files, as well as recurses (top-level only) of a
supplied directory.

It does NOT modify the original file (except for C<remove>). We create a 
subdirectory named C<ci> in whatever path you specify (current working directory
if a path is not sent in), and we then take a copy of each original file, modify
it, prefix the filename with a C<ci_>, and place it into the new C<ci> 
directory.

=head1 ARGUMENTS

=head2 -i, --image

Mandatory in all cases.

Name of a single image file, or a directory containing image files. In the case
of a directory, we'll iterate over the top level, and work on all image files
found.

=head2 -n, --name

Mandatory, unless using C<--check>.

This is the name that will be used in the copyright string for the C<Copyright>
EXIF tag, as well as the C<Creator> tag.



( run in 1.051 second using v1.01-cache-2.11-cpan-df04353d9ac )