public UGCanvasRenderTarget(UGSize canvasSize, float scale) { Size = canvasSize; Scale = scale; var width = (int)(scale * Width + .5F); var height = (int)(scale * Height + .5F); Bitmap native; if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { using (var colorSpace = ColorSpace.Get(ColorSpace.Named.Srgb)) { native = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888, true, colorSpace); } } else { native = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888); } native.Density = (int)(160F * Scale + .5F); _native = native; }