HOWTO: Adding a signature/watermark overlay to Photographs using Open-Source software

Posted on January 20, 2008, under meta, photography.

Since launching the new photoblog over at all costs I’ve gotten a few questions about how to overlay a signature, and how I’m doing it.

My Signature, on a photo

I’m a command line type of person so much of the processing software for my photos is python scripts I’ve hacked together, but in this case it’s just some simple ImageMagick which you can do almost anywhere. ImageMagick is much better than using Python’s own Image Library (PIL) because it actually maintains the embedded colourspaces (PIL just strips them).

Step 1: Create the image

The first step is to actually write out the signature, and to take a photograph of it or scan it. I recommend writing it out as big as you can, with a thick marker, on white paper. If you’re taking a photo of it, try to light the paper evenly and take the photograph from directly atop the paper. Once you’ve got an image to start with, load it into the Gimp.

1st step

Step 2: Crop the image

Select what you want with rectangle select tool, and crop, using image -> crop to selection.

2nd step

Step 3: Convert to 1-bit

We don’t want to worry about all of the various shades that are in the image, so we convert to a 1-bit image. Use Image -> Mode -> Indexed to convert.

3rd step
4th step

Step 4: Convert to grayscale

Now that we’ve cheated and used 1-bit mode to quickly go black-and-white, we need to go back to greyscale mode so that we can use transparency and play with the brightness a little. it’s at Image -> Mode -> Greyscale.

5th step

Step 5: Invert the colours

Use Colors -> Invert to transform the image into white on black, which is much better for overlaying onto photographs generally.

6th step

Step 6: Add an alpha channel

Since we need the final result to contain transparency, we need to add an alpha channel. It’s at Layer -> Transparency -> Add Alpha Channel.

7th step

Step 7: Remove the background

Use the colour-select tool at Select -> by Color to highlight all of the black background, and then cut it out using ctrl-x (or edit -> cut).

8th step

9th step

Step 8: Tweak the signature image

Personally I found that using a pure white signature was too strong and distracting, so I lowered the brightness by about 30%.

10th step

11th step

Once you’re happy with the image, you need to have it as a PNG file, so that we keep the transparency information.

Step 9: Applying the signature to photos

ImageMagick makes this fairly easy, all that I use is:

convert -composite -gravity southeast original.jpg signature.png output.jpg

Where photo.jpg is the original jpg of the photograph, and output.jpg is where you want the result.

Step 10: Enjoy the results

Conehead

New Photoblog

Posted on January 13, 2008, under photography.

Although I’ve been updating this blog less frequently than I used to, I have been taking a lot of photographs over the last few months. Gradually I’m getting slightly more and more confident in the results, and I have enough of a buffer of publishable photographs that I’m finally ready to start blogging some properly.

So, to that end, I’ve kicked off a Photoblog over at all costs, and you can subscribe to the feed too.

The blog itself is a mix of a custom theme and plugin I’ve hacked away on, for WordPress, and some styling from the Juicy theme too. There’s also some python hackery behind the scenes to fetch the photos from flickr, tinker with the colour-spaces, overlay the signature and then output two named renderings.

The photos will continue to go up to flickr, and each entry includes a link to the flickr page, along with tags explaining what equipment was used to take the picture. Hopefully I’ll be blogging photos at the rate of about 3 a week, and getting better as I go!

Mini-review: Sigma 10-20mm f/4 DC

Posted on January 3, 2008, under general, photography.

So, now that I’m back writing these things, there are two reviews to be done, and where better to start than with the Sigma 10-20mm f/4 DC I got way back in August.

Orly from heaven

The 10-20mm is an ultra-wide-angle for small-frame Digital cameras, giving about the same field of view as a 16-32mm would conventionally. Typical uses of this range are for architectural and landscape photography along with gritty street photography and photojournalism. Over at InPhotos this lens seems to be Donncha’s favourite, and there’s a ton of examples you can oogle at.

My experience with the 10-20 has been more of a mixed bag. I’m glad I bought the lens, and it lived in my camera bag until I upgraded to a larger format camera, but I didn’t use it as frequently as I had hoped (mainly due to travel).

Hoogslandse Kerk Leiden Everyone at the Tapas bar
Orly, choosing Irish Hunger memorial

First off, the lens does an excellent job of architectural photography. If you need to take a picture of a tall or wide building, and there’s not much going on, it can do a great job. If you take the time to learn how to get a decent exposure, it can do an amazing job of capturing rich tones and textures. I was pleasantly surprised by just how much detail came out in the photo of Hoogslandse church above, including details inside the building.

But when it comes to street photography, or people, the lens isn’t quite as versatile as I’d hoped. It’s not so much the lense’s fault as a problem with the format in general. The lens is so wide, and the sensor so small that this leads to two problems.

Firstly there is quite noticeable distortion and barrelling. Objects and people can take on a very wooden and 2 dimensional look. Very little of the depth comes across from the stones behind Orla, in the lead photo of this article, for example. And if you look at the plate of crackers on the table at the restaurant it’s positively oval (in reality, it was round, the distortion is particularly harsh at the edges).

Although a wide-angle lens is certainly not a portrait lens, the distortion means that when you want to shoot a subject, they are going to have to be at or near the centre of frame, which is pretty restricting in terms of composition. This is pure physics, and there’s nothing Sigma can do about it, it takes that short a focal length to get a wide viewing area on a small-frame camera. But it’s worth keeping in mind if the main purpose is for indoor use.

Grande Arche

The second problem is that because the viewing area is so wide, the camera’s metering system (and you!) has to do a lot of work. There can be huge degrees of variation in the exposure levels across the shot. Notice the over-exposed sky in the lead shot, or Simon’s white shirt in the group shot at the tables. Again, this is physics, there’s nothing Sigma can do about it, but it is worth keeping in mind that learning how to expose properly, having a 9-point (or more) in-camera metering system or getting a hand-held meter will be what makes the real difference with this lens.

Off the cuff and photo-journalistic shots will tend to have some of the scene blown out and overexposed. That’s not always a bad thing, it’s a valid and distinctive look (most of Donncha’s photos are shot like this), but if you prefer a more naturalistic capture it might be worth thinking about it.

Since I upgraded to a full-frame camera, I’ve sold this lens to Colin, who’ll make good use of it, but it definitely made a useful part of my collection while it lasted. It wasn’t anything like the lens I used most frequently, and it wouldn’t be at the top of my shopping list if I was building a new set. As a wide-angle for a digital SLR, it is very good – and presently has no competition, and if you know how to use a metering system it will reward you with excellent photographs.

Ar ais – san Ísiltir

Posted on December 20, 2007, under general, photography.

So, tá sé thart ar dhá mhí ó cuir mé aon rud suas anseo, de bharr cúiseanna éigsiúl. Faoi láthair tá mé san ísiltír arís (bhíos i mo gcónaí anseo do ceithre mí déag) do seachtain, roimhe sin bhí mé i Londain agus roimhe sin Cathair Nua Eabharc. Táim fós ag obair do Joost, ó Baile Fhormaid, agus ag taisteal ar Coláiste na Trionóide san oíche. So, tá mé beagáinín gnóthach, ‘sin mo leiscéal ar aon nós.

It's cold outside

Tá go leor a caithfidh mé scríobh faoi, fuair mé camera nua (Canon 5D) agus roinnt gloinne nua (Canon 24-70 f/2.8L, Canon 17-40 f/4L, Canon 50mm f/1.4), agus tá roinnt nuacht eile agam. Só, bí ag tsnú le cúpla airteagal eile, tá beagáinín am agam anseo liom féin chun méar a cur le méarchlár.

(English-speakers: Normal service will be resumed shortly).

Mini-review: Canon EF 85mm f/1.8 USM

Posted on August 16, 2007, under general.

While I was in New York, I bought two new lenses, a Canon EF 85mm f/1.8 USM and a Sigma 10-20mm F4-5.6 EX DC HSM. I’ll review the 10-20mm later, once I’ve used it more, this post is about the 85mm, which Colin recommended.

The main reason I bought this lens was to have a good, fast, flattering portrait lens, and so far I’m not dissappointed. It suits my needs very well. At maximum aperture of 1.8, it’s pretty fast, and it’s got quick & quiet auto-focus even in relatively low-light conditions.

Michele Taking a photo in Union Square
Johnny Girl in Union Square

The speed leads to both rich and deep shadows, and also soft lighting effects, which I like. It’s not quite as good for taking further-away outdoorsy shots, with some visible aberration around light sources. For example the streetlights and signs in these two photos:

Time's Square Time's Square

But with a bit of patience, with only slightly better light, it can be used for producing some great outdoor shots too, with as much richness as indoor shots:


Evil lair building

Like any f/1.8, it’s got amazingly shallow Depth of Field, which is great for taking artistic shots or highlighted portraits. You can see the DOF yourself in these two shots;

Bench

Rail

The depth of field varies depending on how close you are to the subject, the portraits above are reasonable examples of shallow depth of field for highlighting. Apart from the very basic UV protector I bought with the lens, so far I don’t have any filters which fit it’s 58mm size. Without using any filters though it’s still got excellent colour separation and contrast.

Repair work in Central Park

It’s a reasonably light and convenient lens, and it’s quietness helps too for taking photos without people noticing too much. At 85mm, it’s field of view – especially on a small sensor – can be frustrating. It’s not as verdsatile as the 30mm 1.4 (in other words, get that first). But at the price, it’s an excellent lens, ideal for people like me who don’t want to spend too much but taking good looking photos with a wide aperture. Great for portraits and street photography alike.

Damovo fail to understand e-voting basics

Posted on August 1, 2007, under evoting, general.

Unfortunately another IT company has decided to push the e-voting issue again. Damovo have commissioned a survey and are creating the impression that electronic voting would somehow increase turnout. With two features in the Independent and SiliconRepublic.

The articles are simply staggering. By means of a survey, it’s revealed that 44% of the non-voting respondents could not make it to their polling station on polling day. E-voting, it is headlined, is the solution! Well, unfortunately trial after trial has failed to increase voter-turnout consistently. Even in Ireland, when trialled, turnout did not rise with any significance. What about moving the polling day? What about re-examining the postal voting system? What about allowing multiple polling days? The premise that e-voting is the only, or even most effective, solution is flawed.

There are some worrying statements from John McCabe – MD of Damovo Ireland – who says:

“If you can do your tax returns online, why can’t you vote online?”

The simple reason, is that online voting cannot be implemented both anonymously and secure from tampering, they are mutually exclusive requirements. But it doesn’t stop there:

Reminded of the over-the-top controversy around e-voting booths five years ago, McCabe said there are secure technologies available today that would eradicate concerns. “For purpose of identification people could use their biometric passports or use one-off polling cards.”

I’ve read and categorized every single submission to the Commission on Electronic Voting. As far as I’m aware identity fraud was not raised a concern with the e-voting system. It is an unrelated concern. The problem was, is, and will always be the vulnerability to undetectable vote tampering and failures.

Worse still, if we make identity a chief concern, then surely we must rule out all remote voting? The implications of McCabe’s statements are self-contradictory. If McCabe’s statements are a reflection of Damovo’s general competency, I worry for their future.

66 days …

Posted on July 21, 2007, under general, photography.

I only have 66 days left in the Netherlands, before I head back to Dublin to resume my part-time studies at Trinity. This has the unfortunate side-effect of making me incredibly busy lately, and I haven’t been able to write as much here as I would have liked. So, instead, for the next 2 months as I try and explore and see as much of the Netherlands before I leave, I’m going to take some photos and post them here.

And to start with, here’s my favourites from the last 2 weeks.

Zoja on the beach Sunset at Katwijk
Agata Geir
Tree in the mirror
Rebecca Big huge satellite

Let me know if you like any, I’m still trying to judge what works and what lenses to buy next.

iDefense offers zero-day bounty

Posted on May 18, 2007, under apache, general.

ooooh, iDefense are offering a bounty on zero-day exploitable flaws in Apache, sendmail, bind, openssh, iis and exchange. I’ve managed to contribute code in varying degrees to most of those, so what I want to know is “does it count if I add it?”.

The prize and length of time seems disproportionate with the challenge though, I don’t think it will be as hard as the ZD-net piece speculated to find zero-day flaws when sufficiently motivated. I do think it’ll easily degenerate into arguments about the nature of the flaws and their severity more than anything else, but still it’s a good thing to see.

Joost ops @ Keukenhof

Posted on April 21, 2007, under general.

Every year there’s a (really) big flower show at Keukenhof, which is very close to Leiden. Sander suggested we all go, and go we did, with honorary ops member Allan too. It turned out to be the best day of the year to go, right in the middle of the blooming time, and the weather it was great.

Some flowers

It proved to be an excellent opportunity to use all of our cameras. My photos are in a flickr set, Andy’s are here and I’ll link to Thom’s, Allan’s and Sander’s as they go online.

Joost coming to /etc/services

Posted on April 20, 2007, under TheVeniceProject, general.

It’s not every day you get an IANA assigned port. This is cool;

joost		4166/tcp   Joost Peer to Peer Protocol
joost		4166/udp   Joost Peer to Peer Protocol
#			   Colm MacCarthaigh
 April 2007
London Skyline

We’ve been super busy lately, and I haven’t found the time to post much. But if you’re interested in what’s keeping me busy, here’s my presentation from UKNOF.