cleanup code for zooming bitmaps and creating corresponding masked bitmaps