N E T B U I E dot net
The other white meat

April 28, 2003

New photos

I've uploaded new scans of pretty much every photo on the site, plus some new ones. The new photos are being loaded into the random image script on every page, but it'll take some time to replace all the hard-coded images on each of the photo pages.

It took a long time to scan all the negatives and slides, and then go through some attempt at color correction and removing dust and scratches, so I wasn't too thrilled with the idea of resizing each one individually, or even going through recording a Photoshop action to do it. So, the logical thing was to use Imagemagick and perl.

Imagemagick is a free command-line image processing utility that runs on unix and linux boxes. And Mac OS X! The advantage of using it over Photoshop is that since it is command-line, it can be incorporated into scripts. It's nowhere near as functional as Photoshop, but for resizing a large number of TIFFS, it's ideal.

The Imagemagick command is embedded in a perl script that reads the contents of a directory (TIFF files sorted by horizontal or vertical aspect) and plugs each one into the command. The script gets the name of each file (eg, 94fb10.tif) and saves the output as a correctly-named jpeg (eg, 94fb10.jpg).

I have four separate scripts, two each (one for large, one for thumbnails) for horizontal and vertical. If I was a half-decent perl scripter, I'd just have one script that would detect the aspect and resize accordingly. But...

Anyway, here's the script:

#!/usr/bin/perl
#
# resize.pl sourcedir destdir "options"
#

$targetExtension = "(jpg)|(tif)|(bmp)";
$thumbnailExtension = "jpg";
$thumbnailSize = "194x";
$mediumSize = "780x";
$thumbnailName = "-sm";
$mediumName = "-lg";
$pathToIm = "/usr/local/bin/";

($startDir, $destDir, $options) = @ARGV;

opendir (START, $startDir) || die "Couldn't Open Start dir: $startDir";

@files = readdir(START);

closedir (START);

if (not -d $destDir) {
mkdir ($destDir, 0775);
}

foreach $file (@files) {
($fname,$extension) = split(/\./,$file);
if ($extension =~ /$targetExtension/i) {
`$pathToIm/convert $options -interlace NONE -filter Lanczos -geometry $mediumSize -unsharp 1x2+1.2+.08 -border 10x10 -bordercolor black -quality 75 "$startDir/$file" "$destDir/$fname$mediumName.$thumbnailExtension"`;

}
}

The script takes three arguments, source directory, target directory, and imagemagick options that aren't already specified. I cropped all the images to a 3:2 (or 2:3) aspect ratio, so they should all be the same dimension after resizing. The -filter option specifies which resampling method to use when down-sampling during the resize. The -unsharp option is an unsharp mask filter with radius x std dev + amount + threshold. The -quality option specifies the jpeg compression level.

It took about an hour to generate a pair of images (large and thumbnail) for all the source images. Much faster than doing it either manually or via actions in Photoshop.

Posted by jbuie at 09:32 PM | Comments (0)

April 20, 2003

Still jobless

So, I'm going on three weeks without a job. I've applied to a mess of job postings, been ignored by most everyone, had a couple interviews, and have one solid possibility. I was hoping something would work out at my previous place of employment, but that doesn't appear to be in the cards. With any luck, I'll have a job before we run completely out of money. That will happen way sooner than I'd like... I keep telling myself even a bad job would be better than no job. Unless I win the powerball or something.

A friend of mine suggested I get my MCSE if I want to get a job. Thanks for the helpful advice, John! I'll get right on it...

Being jobless is pretty disorienting. For the last 6-plus months, I've been living with the stress of knowing the end was coming, and not being able to do anything about it. No jobs to go after around here. Add that to the stress of losing my job, throw in a couple job interviews (normally stressful enough, I guess, but when you are unemployed with 3 kids, the stakes are really high), and I've been about as cheerful as Mr. Rogers off his Xanax.

I have no idea what to do with my time. Linda thinks I should clean the bathrooms. Logical, I suppose, but not much fun. If I knew I was going to get paid again soon, that would be different. But I can't run off and shoot 10 rolls of film without knowing whether I'll be able to have them developed.

And I'm sure my friend John would tell me I should go digital anyway...

Posted by jbuie at 11:40 PM | Comments (1)

CSS Roolz

I just finished updating all the internal pages to get formatting from one of two stylesheets. I'm sure the proper way to do it is to have a single really well-organized stylesheet, but I'm not organized. So I have two.

Stylesheets are just cool. Saves lots of time, once you go through the effort of figuring the dang things out. Mine are only half-assed, and yet everything looks so much better. At least it does to me...

Posted by jbuie at 11:23 PM | Comments (0)

April 15, 2003

Um... woops.

Guess he's not staying.

I have no idea why Roy Williams wants to come back to Carolina. Actually, that's not true, I do have ideas why, I just didn't think those reasons would outweigh the reasons to stay in Kansas.

But I'm damn glad he's coming back.

Posted by jbuie at 10:29 PM | Comments (1)

April 13, 2003

He's stayin'

Not that anyone really cares except Carolina fans (and Kansas fans, of course), I'm getting a little weary of the whole Roy Williams waiting game. This whole thing has reminded me of the summer of 2000.

The only reason I was ticked that Roy didn't come back to Carolina 3 years ago is: he knew for years the decision was coming. He lobbied for the job in the years leading up to Dean Smith's retirement, according to many, many people. And yet he took a week to think about it.

I don't begrudge the guy turning the job down, I just begrudge the guy taking a week while reporters are camped out in his driveway, after giving a verbal assent (again, according to reports), and then allowing Carolina's program to be humiliated at a massive pep rally celebrating his decision to stay.

Having said all that, I think Roy would be crazy to come to Chapel Hill, and I don't think he will. Why would he leave? He's virtually worshipped in Lawrence, he's built a solid, respectable, quality program. He gets good kids, they graduate, they love him.

Carolina has a mess. We have a talented group of guys who need a leader, and an AD who seems to want to dismantle Dean Smith's legacy. I don't know, maybe Roy wants a challenge...

I predict Roy stays in Kansas, and Carolina either winds up with Larry Brown, or someone totally out of left field. Bill Self would be fine, too. Just not Kelvin Sampson.

Posted by jbuie at 10:57 PM | Comments (0)

April 12, 2003

No mas

Finally got around to taking the guestbook down. It was getting a bizarre variety of entries, almost all auto-generated by real estate web sites and porn sites. Mostly from Germany, too.

The thing was just taking up too much space, and it was depressing that it was the most visited page on this site.

So, it's gone now. If you want to say something to me, send me email or use the comment links at the bottom of each entry.

Posted by jbuie at 10:50 PM | Comments (0)