App::CopyrightImage - Easily add Copyright information to your images
Modified copy of images will be placed into a new 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 ci_.
ci
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
This 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.
imgcopyright
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 remove). We create a subdirectory named 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 ci_, and place it into the new ci directory.
remove
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.
Mandatory, unless using --check.
--check
This is the name that will be used in the copyright string for the Copyright EXIF tag, as well as the Creator tag.
Copyright
Creator
Optional.
This is appended to the --name when populating the Creator EXIF tag if it is sent in.
--name
Checks for missing Copyright and/or Creator EXIF tags in the image(s) sent in with the --image option.
--image
By default, we use the directory sent in with --image (current working directory if a path isn't provided), and put all modified images in a new ci directory under it.
Send in a directory path with this option and we'll put the image files there instead.
WARNING: This option DOES edit the original file, and does not make a copy first.
Removes copyright EXIF information for files sent in with --image.
By default, if an image already has EXIF copyright information, we skip over it and do nothing. Set this option to overwrite any found copyright info.
Exports imgcopyright by default.
Sets up various configurations, and then executes the EXIF changes to images sent in.
We set the Copyright EXIF tag to Copyright (C) YEAR by NAME, where YEAR is auto-generated, and NAME is sent in as an option (see below).
Copyright (C) YEAR by NAME
YEAR
NAME
We also set the Creator EXIF tag to NAME (EMAIL). If EMAIL is not sent in as an option, it, and the parens around it will be omitted.
NAME (EMAIL)
EMAIL
Returns a hash reference with the following keys: ok and fail. Each key contains an array reference. The former contains a list of the image names that succeeded, and the latter, a list of image names that failed.
ok
fail
Options:
A string containing either an image filename (including full path if not local), or the name of a directory containing images. If the value is a directory, we'll operate on all images in that dir.
We will, by default, create a new sub-directory named ci in the directory found in the value, and if the directory is current working directory, we'll create the sub directory there.
All updated images will be copied into the new ci directory with the same filename, with a <C>ci_</c> prepended to it.
Eg: "/home/user/Pictures"
"/home/user/Pictures"
We won't make any changes, we'll simply check all images specified with the image option, and if they are missing either Copyright or Creator EXIF data, we'll print this information to STDOUT.
image
STDOUT
A string containing the name you want associated with the copyright notice. It will be used in both the Copyright and Creator EXIF tags.
Eg: "Steve Bertrand"
"Steve Bertrand"
A string containing the email address of the copyright holder. This will be included in the Creator EXIF tag if sent in.
Eg: "steveb@cpan.org"
"steveb@cpan.org"
A string containing the name of a directory to be used to store the manipulated images. By default, we use the path sent in with the image option.
Eg: "/home/user/backup"
"/home/user/backup"
Bool. If set, we'll remove all copyright information on the image(s).
Bool. If set, if an image already has copyright information set, we'll overwrite it. By default we skip these files.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2016 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install App::CopyrightImage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::CopyrightImage
CPAN shell
perl -MCPAN -e shell install App::CopyrightImage
For more information on module installation, please visit the detailed CPAN module installation guide.