Adding CC Images To Photos
This is a re-post from December 2019
If you create lots of media such as photos or graphics. You may want to add information pertaining to the copyright (or ideally copyleft) of the image.
As I am interested in Creative Commons (CC) then it makes sense to be able to add one of the many creative commons license logos to an image.
I asked on Friendica about how to do this (having tried and failed before) and was provided with some help and a really useful shell script to automate the process.
Firstly we need an image to modify and a logo image to add to this:
Example logo file to insert
For the sake of this article, I am just using a random photo I took of Paignton Geopark. I have also reduced the image size to 640×480 to make it smaller for the website as per command below.
gm mogrify -resize 640×480 *.JPG
I also had to convert the jpg files to png files with the following
gm convert DSCF0182mod.jpg DSCF0182mod.png
So that this blog would display the images.
The next step is to create a folder structure to contain what we need to undertake the work.
What we need is a new folder
Inside this, we need another folder called out
we need some more files mostly the cc logos, these are available from a simple duckduckgo search.
Note if putting on a website or other media you need to properly include the creative commons license being used on here I have put
Which should then link to the human readable license terms you want to use.
So what we should have is
Put the SOURCE FILE in \insertcc-logo
MODIFY AND RUN the script below
Our script looks like ( save this as insertcc.sh or what you want to call this )
for p in *.JPG; do convert “$p” ./out/88×31.png -gravity southeast -geometry +10+10 -composite “out/$p”; done
What the script does is take each file with the JPG extension (or other extension), add the required logo, and save the modified file in
As per :
You need to make sure that the script points to the correct source files.
You also need to point the script to the correct file you want to insert in to your source image.
for p in *.JPG;
To use a different logo change this section of the script
This article originally appeared on http://www.zleap.net.
|Mastodon||Peertube||Qoto sign up|