Fixed ToBitmap bug when ROI is specified