writeBitmap return (Bitmap, rest)