Processing Scanned Images on the Command Line

So I’ve done a bunch of scans on my scanner, into TIF images, 600dpi, perfect for for archiving. But I need to rotate them correctly, and shrink them into more usable JPEG files. Here’s how:

For the rotation, I used an EXIF tool appropriately named ‘ExifTool’ to change the orientation setting on the file, without modifying any of the image data. If you’re feeling commandline lazy, you can also setup an apple script (open it in the Apple Script editor, save as an Application, then drag your images onto it, it works in a batch so drag all the similarly-orientated images together).

Now the TIF’s are all good, I wanted to convert into JPEGs. The best way is with ImageMagick.

mogrify -auto-orient -resize 800x800 -format jpg -quality 80% *.TIF

Mogrify is a batch processing tool that by default will overwrite the input file, so it’s a little dangerous. But by inputting a .tif, and outputting a .jpg it will *not* overwrite the tif’s since the filename is different. But if you’re scared, just copy the tif files to a new directory.

Read more…

SoundCloud isn’t the YouTube of Sound

For the simple reason that you can’t upload unlimited tracks for free. In fact you can only upload 2 hours worth.

That’s their model, and that’s fine. But the YouTube model it is not.

Gravatar “The type of image you are trying to process is not allowed”

I recently started getting this error from Gravatar “The type of image you are trying to process is not allowed”

Gravatar no longer redirect directly to the default URL you gave, but use an image caching service “”. This cache insists on your URL ending in “.jpg” or “.png” (there may be others). So I was able to fix this error by supplying a default URL to Gravatar which ended in “.png”. If your default URL doesn’t end in one of those extensions, you’ll get this error.

On a side note, it looks like that CDN is quite open about what images it will serve! For example: Did WordPress unintentionally give the world a free image CDN?

Update: official post here. Another debugging tail.

iOS Contact Syncing

Somewhere along the line my contacts stopped syncing with my Mac.

Easiest solution was to push everything through iCloud, and disable direct contact syncing. Fine by me, I’m happy to have the backup as well.


The Confusing State of Windows Phone 8

I’ve jumped on the Microsoft bandwagon in recent weeks, I’m a huge fan of what they are doing in the PC and tablet space, unifying the two devices (a policy I wish Apple would do, rather than just bring GameCenter to Mac, but I digress). Of the key things I liked was the ability to write once, run anywhere. At least so I thought. It appears that WP8 will likely not run WindowsRT apps from the start (gah! I thought that was the whole point of Windows8!).

from PC World:

Unfortunately, Lieberman admits that another holy grail — the capability to run a single app across multiple platforms — won’t be ready with the first release of Windows Phone 8. “We do believe that is a compelling goal that we would like to get to,” he says. “It is something we want to figure out how to get to as quickly as we can.”

As a new company, planning to launch into this space, it’s really confusing what we should be doing. A “near final” beta of the SDK drops September 12, but only to a select audience which is disappointing. With the SDK officially launching on October 28, we have a lead time of about 2 weeks till the Lumia appears, half of which would be taken by submission. That’s not a lot of time to be part of the launch.

Aside: This is a good summary of the risk levels of microsoft technology (WinRT is listed as risky).

Busan to Mokpo by Rail

I visited South Korea last month. For my adventures outside Seoul, I bought a rail pass which allows unlimited rail travel. Wanting to see the country, and get my money’s worth, I embarked on journey to visit the 3 corners of Korea connected by the KTX fast rail (Seoul, Busan and Mokpo).

Seoul to Busan was easy. 1 ticket, free Wifi, super-fast train. No worries. Getting from Busan to Mokpo however was surprisingly hard. It seems all trains lead to Seoul. The official journey planner returns no results, and one employee told me it “wasn’t possible”.

Busan to Mokpo by Rail, as captured with  Geospike

Well it is possible, and here’s how: Read more…

Bangkok to Siem Reap Overland

On the September 25, 2011 my girlfriend and I travelled overland from Bangkok to Siem Reap. This is a famous route, and I had read a few horror stories. However, many were a few years old and I had also read that things had improved a lot recently in terms of road quality.

Overland, Bangkok to Siem Reap. As captured with  Geospike

We managed to do this journey spending less than US$25 each, arranging everything ourselves (no end-to-end bus), avoiding land-mines and without getting ripped-off. For anyone interested in this journey, here’s how ours went down:

Read more…

Death of a Hard Drive

Lost another HDD today. Seagate 2.5″ 750GB in an external caddy. Fell about 35cm, while plugged in and that was the end of it. Clicking noise on start and nothing.

Fortunately just about everything was backed up, but just another lesson that they can die anytime I guess. Especially external ones attached to laptops which are certainly more prone to dropping than the rest.

It was an an Orico aluminium caddy. Maybe plastic is better, slightly more absorption? Unlike a laptop, there is no drop protection I guess. Maybe I should add some padding of my own. That or switch completely to SSD’s for my laptop.

Fixing the MacBook Pro Retina’s Poor Battery Life

My new MacBook Pro Retina was getting terrible battery life. Less than 2h on full charge! I was extremely disappointed, given I could get about 4h on my last MacBook Pro. Fear not however, it was all in the software.

Here’s how I fixed it: Read more…