Bits, bytes and beauty

Monday, November 26, 2007

Liquid Rescale

I was very impressed by the image resizing demo you see here:

So when I saw that there is a Gimp plugin for it, I decided to try it out. Installation was a breeze thanks to MacPorts, my first experiments worked but when I wanted tor draw a mask, the Gimp crashed. This was due to the issues documented on, and fixed by, the XDarwin page on the x.org wiki.

So anyway, here are the results. First the original photo of people at the beach:

and again, but with the kid selected for removal and the width of the image reduced:

Notice the stretch of empty beach is shortened, yet both the people above the kid as well as the dog survived intact.

Sunday, November 11, 2007

Leopard shell annoyances

After having been bitten by the erroneous LANG=UTF-8 environment variable that Terminal added (you can disable it in the prefs under Advanced), I decided to figure out why man port would claim there is no man page for port.

The problem turns out to be not any misconfiguration of /etc/man.conf, that file is fine as it is. The real problem is the MANPATH environment variable that's shown up out of nowhere. Or rather, it's set by /usr/libexec/path_helper from the shell startup files. The goal of path_helper is to make it easy to add entries to everyone's PATH, in particular entries for X11. But path_helper doesn't seem to know that also setting MANPATH is a) unnecessary with a modern man program and b) detrimental, because setting MANPATH disables the automatic matching of man directories with bin directories in your PATH.

I fixed it by unsetting MANPATH in my shell startup file.

Saturday, October 27, 2007

Open Document Format in Leopard

Scrolling through the 300+ New Features page at Apple I noticed a mention of ODF under the UNIX heading. Curious, I found an ODT file, right-clicked and there it was: under NeoOffice, TextEdit.app sat there claiming it knew how to open my document. Both opening and saving works, the fidelity is about what I'd expect. But there's more: the new QuickLook feature also works with ODT files (see the screenshot of part of the ODF spec itself). Just find a file in the Finder and press space to look inside.