forked from: Sprites to Bitmaps with draw and copyPixels

