Category Archives: Software development

Scaling, padding, Cocoa, and Bindings

I mentioned a while ago needing to implement batched image processing for my mom’s website that would allow her to easily generate a bunch of images of a certain size, padded with a certain color, for her website.
Besides the problems I mentioned in that post, I soon discovered that wrapping things up for Automator isn’t [...]

Cocoa Bindings are awesome, yet fraught with peril for the inexperienced

Apparently ivars that are bound to from a nib, via a controller object, don’t have an initial or default value unless I assign one either via code or via the UI element.
Almost all of my experience with the NeXT and Apple APIs pre-dates bindings and core data by nearly a decade, but I’ve had enough [...]

QuickTime, Texturing, and OpenGL

The movies I’ve examined don’t have an alpha channel so I’m using RGB and it works fine.

// Create an off-screen gworld where QT can draw
gworldBuffer = calloc(width * height * 3, 1);
QTNewGWorldFromPtr(&gworld, k24RGBPixelFormat, &movieBox, NULL, NULL, 0,
gworldBuffer, movieBox.right * 3);
gworldPixMap = GetGWorldPixMap(gworld);
LockPixels(gworldPixMap);
gworldPixBase = GetPixBaseAddr(gworldPixMap);

And then later on when I want to render to the texture:

// [...]

No photoshop? Batch workflows no problem!

I’ve been helping my mom out a bit lately with the website for her artwork, Voice of Flying Ink. It includes a few galleries of her works in a simple table of thumbnails layout. It’s reasonable that occasionally she’ll want to put up some new pictures, which involes scaling and padding the original to two [...]

Eradicating a missing dylib dependency in macports

I would’ve put this on the macports wiki because it’s the kind of thing I will probably need again sometime, but since their move to macosforge.org, I can’t modify their wiki.
A few weeks ago, a new version of gettext was committed to macports. This new version installed libintl.8. A whole bunch of macports, particularly [...]