Thursday, May 3, 2007

How to add watermark to 300 photos in 150 seconds ?


F.O.T.U (Focused on the Unfocused) is the name of my photoblog

I started that photoblog several years ago. Unfortunately, I had to stop it.
recently I decided to publish it again. After testing several photoblog systems, I finally chose PixelPost.
(I used to use FolderBlog which is also great but too simple for me)
I liked PixelPost, I edited its default template, but before uploading my photos I needed to resize them and add my watermark to each photo .

I resized all my photos and I added my watermark to all of them in a few seconds
not with Photoshop nor with Gimp ,it would take many hours and a lot of energy using a graphical photo editor, this is one of the situations which a console based program is necessary , I mass edited all my photos using "Image Magic" in a few seconds !

in Ubuntu install Image Magic using :
sudo apt-get install imagemagick
(they have both Windows and Linux version)

then I copied all my photos into a folder on the desktop like "myphotos" then :
cd Desktop
cd myphotos
then I resized all my photos by this command:
mogrify -resize 65% *.jpg
depending on the number of your photos it would take sometime , for me it took a few seconds

you could resize the photo by giving the exact width and height too like this
mogrify -resize 256x256 *.jpg

and then I added my photoblog's name (Focused On The Unfocused) in white color with a black shadow and 22 font size to the bottom of all of my photos using this command :
mogrify -font /usr/share/fonts/truetype/msttcorefonts/Arial_Black.ttf pointsize 22 -verbose -draw "gravity south fill black text 0,33 'Focused On The Unfocused' fill white text 1,32 'Focused On The Unfocused' " *.jpg
Note that you should give the program the address to font file on your system , (I have marked it in green) in ubuntu fonts are normally in /usr/share/fonts/truetype/
(in windows they are in c:\windows\fonts\)

to find out the exact Arial font's address on my Ubuntu system I used this command :
locate Arial*.*
ok we are done ! :)

I add another text to all my jpg photos in the folder ;

  • Text is "WWW.FOTU.SHEVIN.INFO"
  • Smaller font size (15)
  • Another font type (Purisa)
  • Orange Color
  • On the the top Left Corner
here is the command (follow the colour equivalents to learn the command format )
mogrify -font /usr/share/fonts/truetype/thai/Purisa.ttf -pointsize 15 -verbose -draw "fill black text 5,23 'WWW.FOTU.SHEVIN.INFO' fill orange text 6,24 'WWW.FOTU.SHEVIN.INFO' " *.jpg
Mass editing photos saves your time and more important you get the same look on all of the photos , there are many other things than resizing and watermakring which you can do using ImageMagic you can study the commands on their website .



After doing all this stuff , it was was lovely when people visited my F.O.T.U and admired my photos .

Piling told me :
in fact you have your own style , your pictures are dreamy, mysterious, a bit melancholic. like you in fact !

too bad I don't have a camera any more to take more photos... (if you are Bill Gates or somebody ,you are welcome to buy me a camera . wink)

today I also added some things to this blog's template (I am still working on my blog template)
Post a Comment

Related

Labels

computer (48) ubuntu (46) linux (28) tutorial (20) opinion (17) programming (14) software overview (13) terminal (12) troubleshooting (8) life (7) literature (7) poem (7) human languages (6) vim (6) bash (5) google (5) python (5) android (4) cars (4) phpBB (4) suggestion (4) tips (4) 12.04 (3) Chef (3) extension and addons (3) firefox (3) java (3) personal (3) russian (3) shell (3) windows (3) 64bit (2) Calligraphy (2) Chicago (2) Vagrant (2) apple (2) backup (2) bug (2) code (2) eclipse (2) funny (2) google chrome (2) idea (2) monitor (2) php (2) phpBB3 (2) shorter prompt (2) ssh (2) virtualbox (2) $_SERVER['REQUEST_URI'] (1) 2.7 (1) ALT+Backspace (1) AVR (1) Alt-Printscreen-K (1) AutoRotate (1) CTRL+ALT+DELETE (1) DRM (1) Debugging (1) Gimp (1) Gimp 2.8 (1) Microcontroler (1) Restart X (1) UML (1) Ventra (1) adsense (1) amazon (1) audio (1) aws (1) background process (1) battery (1) bing (1) blank (1) blogging (1) bmw (1) boot (1) business review (1) car (1) cd (1) chrome (1) comcast (1) computer kubuntu (1) conference (1) cookie (1) cron (1) database (1) date (1) display (1) domain name (1) download manager (1) dual boot (1) dual monitor (1) extensions (1) feature request (1) file (1) folder (1) freeze (1) gimp single window (1) git (1) gnome 3.10 (1) google docs (1) google plust (1) google+ (1) grep (1) icon (1) install (1) iterator (1) links (1) linu (1) linux links (1) list (1) mac os (1) media server (1) microsoft (1) moonlight (1) music (1) mysql (1) name (1) nautilus (1) netflix (1) notepad++ (1) parking (1) permission (1) philosophy (1) photo (1) prompt (1) protest (1) ps3mediaserver (1) putty (1) read from file (1) realtek (1) resolution (1) roku (1) samsung (1) scala (1) screenshot (1) security (1) selinux (1) server (1) skype (1) space (1) spam (1) spambot (1) sql (1) suspension (1) system monitor (1) tar (1) task manager (1) template design (1) th23 domain (1) thinking (1) ubuntu 13.10 (1) unity (1) vimrc (1) virtual machine (1) weblogic (1) wget (1) with space (1) xorg (1) xrand (1)