File "watermark.py", line 58, in <module>
font = ImageFont.truetype("DroidSansMono.ttf",txtsize)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 228, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 131, in __init__
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
#####note: linux users, please include truetype font path
font = ImageFont.truetype("/usr/share/fonts/truetype/droid/DroidSansMono.ttf",txtsize)
=
requirements: python 2.7 and PIL(Python image library)
first, create a folder(images) and put all your images inside the folder (Don't change the name of the folder)
images inside the folder(images)
if you want to add logo watermark. create logo folder(don't change name of the folder)
logo image inside the logo folder
next double click the watermark.py python file and enter the choice
processing
water marked images folder created to store the water marked images
sample water marked image with text only
sample water marked image with logo only
sample water marked image with both logo and text
for more sample images click water_marked_samples folder
Reference : http://www.pythonware.com/media/data/pil-handbook.pdf