Bitmap from/to a function.