Category Archives: Software development

QuickTime’s Strange API

A while back one of our projects at work needed a plug-in for Unity to play QuickTime movies in the scene. It worked out well; the plug-in took me several days to implement, including one false start where I tried to superimpose a standard QuickTime view, minus the controls, over top of the running Unity [...]

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 [...]