Tuesday, April 7, 2009

twitux: the goggles, they do nothing

After reloading my ubuntu (jaunty not ready, yet) I installed (via apt-get) twitux. The layout was terrible. Apparently, there was a time when graphics were not being resized before being uploaded to Amazon (from what I've read here and here). Twitux is not resizing them for us, so huge images are destroying the layout of twitux. People are asking that twitux be be modified to resize the images and give the option to not show images at all.

In further research, I came across this gem where someone had older avatars that were not being updated. The fix was to delete the avatars out of ~/.gnome2/twitux/avatars. That gave me an idea. While we wait for an update to twitux, why not overwrite the avatars with our own graphic?

Here's what I did:

  1. In Gimp, create a new file, 1x1 pixels, save as ~/blank.jpg
  2. Apply the script below (put it in a loop, chron, etc)
  3. Close, re-open twitux
The script I use is getto simple, the graphic I created in step 1 came out to be 306 bytes, so the script overwrites anything larger than that with our blank graphic.

#!/bin/bash
for i in $( find ~/.gnome2/twitux/avatars -type f -size +307c ); do
cp ~/blank.jpg $i
done

Here is the result:


1 comment:

  1. another idea would be to scale all avatar images to 48x48 pixels using image magick. But it is easy enough to do this manually as the large images are fairly rare.

    ReplyDelete