As it sometimes happens, I've been way too lazy to even start working on the photos I've made during my visit to Brussels this year for the FOSDEM conference. The photos have just been sitting around on my disk, collecting the bit-dust.
I have finally remedied this issue, converted the photos to appropriate sizes and quality. The first gallery I've ever uploaded to my site was from Anaheim, CA, and for that one I've made sure to tag and label each one of the photos I made.
Unfortunately, this grew way too tiresome for me, so nowadays I just upload them as they are. Before that, of course, I reduce the image quality and resize them in order to get something decent-sized which won't boggle-down the hard-disk of my VPS. I also tend to rename the images so that they reflect the date and time when they were taken, and apply some correction to the photo orientation (some of the previous galleries unfortunately ended-up with wrong orientation, and I never got around to fixing it).
For renaming I'm usually using this simple command (executing it from within the directory where the photos are):
For auto-rotation I usually utilise the very nice exifautotrans command:
Those commands come from the exiftool and jpeg-8b packages, respectively. Very useful utilities!
Finally, for resizing I've created a script of my own which will check if the image's largest dimension is within the provided limit. You can find the script attached to this post. The script itself is using the ImageMagick's convert utility, and isn't too powerful. One of these days I should probably sit down and rewrite it to be more robust and with more options (like specifying the desired quality etc. through additional arguments). Still, as many of my scripts, it outputs help when executed with -h or no arguments at all.
And finally, of course, the new gallery can be seen here.
Copyright (C) 2012 Branko Majic. Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice is preserved. Code snippets found throughout the articles are licensed under GPLv3 or later.