@@ -330,24 +330,26 @@ public static SKImage FromAdoptedTexture (GRRecordingContext context, GRBackendT
330330 // create a new image from a picture
331331
332332 public static SKImage FromPicture ( SKPicture picture , SKSizeI dimensions ) =>
333- FromPicture ( picture , dimensions , null , null , false , null , null ) ;
333+ FromPicture ( picture , dimensions , null , null , false , SKColorSpace . CreateSrgb ( ) , null ) ;
334334
335335 public static SKImage FromPicture ( SKPicture picture , SKSizeI dimensions , SKMatrix matrix ) =>
336- FromPicture ( picture , dimensions , & matrix , null , false , null , null ) ;
336+ FromPicture ( picture , dimensions , & matrix , null , false , SKColorSpace . CreateSrgb ( ) , null ) ;
337337
338338 public static SKImage FromPicture ( SKPicture picture , SKSizeI dimensions , SKPaint paint ) =>
339- FromPicture ( picture , dimensions , null , paint , false , null , null ) ;
339+ FromPicture ( picture , dimensions , null , paint , false , SKColorSpace . CreateSrgb ( ) , null ) ;
340340
341341 public static SKImage FromPicture ( SKPicture picture , SKSizeI dimensions , SKMatrix matrix , SKPaint paint ) =>
342- FromPicture ( picture , dimensions , & matrix , paint , false , null , null ) ;
342+ FromPicture ( picture , dimensions , & matrix , paint , false , SKColorSpace . CreateSrgb ( ) , null ) ;
343343
344344 private static SKImage FromPicture ( SKPicture picture , SKSizeI dimensions , SKMatrix * matrix , SKPaint paint , bool useFloatingPointBitDepth , SKColorSpace colorspace , SKSurfaceProperties props )
345345 {
346346 if ( picture == null )
347347 throw new ArgumentNullException ( nameof ( picture ) ) ;
348348
349349 var p = paint ? . Handle ?? IntPtr . Zero ;
350- return GetObject ( SkiaApi . sk_image_new_from_picture ( picture . Handle , & dimensions , matrix , p , useFloatingPointBitDepth , colorspace ? . Handle ?? IntPtr . Zero , props ? . Handle ?? IntPtr . Zero ) ) ;
350+ var cs = colorspace ? . Handle ?? IntPtr . Zero ;
351+ var prps = props ? . Handle ?? IntPtr . Zero ;
352+ return GetObject ( SkiaApi . sk_image_new_from_picture ( picture . Handle , & dimensions , matrix , p , useFloatingPointBitDepth , cs , prps ) ) ;
351353 }
352354
353355 public SKData Encode ( )
0 commit comments