forked from: BitmapDataSample2

