by David Loo | Jan 29, 2015 | Photography, Ubuntu, Utilities
So you’re a professional photographer or just started in photography and you’re not using Microsoft Windows or Apple Mac OS X, but you’re cool techy guy like me that only use Ubuntu or other Linux Distributions that their dedicated operating system.
I show you some of the useful application I have found and used and hopefully the information I have shared here will be valuable to you!
Photo/Image Management
I use Shotwell for managing all my images that I upload from my DSLR camera. One of the reasonĀ thatĀ I am using it is because I store all my images on a remote server and it allows me to access my network shared folders.
One of the feature I like most is the ability to batch upload my images to my Fickr or Facebook account.
When you import your photos, they are organised into folders of the date it was taken or created. You can configure it to allow the use of external image editing software like GIMP, but the Shotwell has some very basic editing features for simple touch ups.
You can check it out here for more details. (more…)
by David Loo | Jul 13, 2014 | PHP
Today I decided to customise my WordPress blog and I wanted add a Gravatar photo of myself on the side menu, so I decided to install PHP Code Widget and wrote the following code snippet.
If you don’t have a Gravatar account click here to create one for yourself.
How this works is that your gravatar image is associated with an email, and to access that image you need to convert an email address to a hash value using md5 function in PHP. With that hash value you need to append it to the end of the gravatar url like this:
http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50
So the code below we are converting the email address to a hash value and append it to the gravatar url and you have an option to specify the image size by providing a parameter ?s=size, size has to be an numeric value eg. ?s=200. Then we echo an <img> with the src attribute pointing to the url address:
<?php
$hash = md5(strtolower(trim("name@email.com")));
$imgUrl = 'http://www.gravatar.com/avatar/' . $hash . '?s=200';
echo "<center><img id=\"gravatar\" style=\"border:1px solid black\" src=\"" . $imgUrl . "\" /></center>";
?>