Thursday, May 27, 2010


Turns out that creating quite impressive panoramas (or rather, impressive for a newbie like me) isn't hard at all! A camera that has panorama-assist feature or a tripod are useful, but they're not required. Once you have the pictures (better to take too many than too few), try Hugin (open-source panorama photo stitcher). Most of the times it does everything automatically, but sometimes you'll have to match points across pictures by hand. 

The problem with the resulting image will be the (sometimes large, depends on the photographer's skill :) areas with no data. Fortunately, there's a solution to that. It's a Gimp plugin that can recreate an area of the picture based on the surrounding pixels only. It it works great in this case. Sure, it's not always perfect and you can get the occasional floating mountain in the middle of the sky, but you can usually fix it quickly by doing same operation on a smaller selection. This amazing plugin is called resynthesizer, and the easiest way to install it is from Ubuntu's repository.

Some samples now.

Sinaia, 2000m altitude

Bucharest, Titan

PDF forms on Linux

I will explain a method of filling in forms inside PDF documents for printing or saving (to send, for instance, a signed copy of a contract via e-mail). I've seen other methods described (see here), but I didn't like any of them: most turn the PDF file into an image, which reduces quality and/or increases filesize, and pdfedit seems overly complicated.

Software required: gimp, pdftk.

First split the original pdf into separate pages (this is one disadvantage, pages need to be edited separately):
pdftk file.pdf burst

Next, for each page that needs changing (let's call it page1.pdf), do the following:
  • Import that page in gimp, using whatever dpi you want for any images you are adding (the higher the dpi, the better the quality. Try 300).
  • The page will show up on a new (and only) layer. Do any modifications on separate layers (if you add text, gimp will automatically insert layers, but if you want to use brushes, make sure you create a new layer that you'll edit).
  • When you're done, hide the background layer (the one with the PDF image), and print to a pdf file (say stamp1.pdf).
  • Now, put the newly created pdf on top of the original page:
    pdftk page1.pdf stamp stamp1.pdf
If your PDF was only one page, you're done. Otherwise, you should join all pages together:
pdftk page1.pdf page2.pdf [...] cat output output.pdf

Now all you need is a high-quality copy of your signature :)

Chrome performance going up!

I'm pleasantly surprised by the continuing advances in performance of the Chrome browser. Not only did it leave Firefox 3.6 in the dust, but it keeps getting better from one day to another. From FutureMark's Peacekeeper benchmark:

  • 5.0 Beta build: 3110
  • 6.0 Dev build: 3544
  • 6.0 Nightly build (Chromium): 3826
It's almost catching up with my girlfriend's score, which is the stable version, but a 44% faster CPU (her Core 2 Duo 2.40GHz vs my Core Duo 1.66GHz).

Firefox has improved some as well (in the image above, FF 3.0's score is from my girlfriend's computer), but it has lots of catching up to do...

Oh, I almost forgot. Watch this funny Chrome ad: