Would be much cleaner if we had getAs() support for Bitmap