Replaces NSImage drawing commands with NSBitmapRep drawing commands. Thanks @kongtomorrow