Use a more modern API.
Try to rely on Cocoa images as much as possible.