public unsafe SKCodecResult StartScanlineDecode(SKImageInfo info, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { var nativeOptions = SKCodecOptionsInternal.FromManaged(ref options); var cinfo = SKImageInfoNative.FromManaged(ref info); return(SkiaApi.sk_codec_start_scanline_decode(Handle, ref cinfo, ref nativeOptions, colorTable, ref colorTableCount)); }
public SKCodecResult StartIncrementalDecode(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nInfo = SKImageInfoNative.FromManaged(ref info); unsafe { var nOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = options.FrameIndex, fPriorFrame = options.PriorFrame, fPremulBehavior = options.PremulBehavior, }; var subset = default(SKRectI); if (options.HasSubset) { subset = options.Subset.Value; nOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_start_incremental_decode(Handle, ref nInfo, pixels, (IntPtr)rowBytes, ref nOptions)); } }
public unsafe SKCodecResult StartIncrementalDecode(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nativeOptions = SKCodecOptionsInternal.FromManaged(ref options); var cinfo = SKImageInfoNative.FromManaged(ref info); return(SkiaApi.sk_codec_start_incremental_decode(Handle, ref cinfo, pixels, (IntPtr)rowBytes, ref nativeOptions, colorTable, ref colorTableCount)); }
public unsafe SKCodecResult StartScanlineDecode(SKImageInfo info, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { var nativeOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = (IntPtr)options.FrameIndex, fHasPriorFrame = options.HasPriorFrame }; if (options.HasSubset) { var subset = options.Subset.Value; nativeOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_start_scanline_decode(Handle, ref info, ref nativeOptions, colorTable, ref colorTableCount)); }
public unsafe SKCodecResult GetPixels(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nativeOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null }; if (options.HasSubset) { var subset = options.Subset.Value; nativeOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_get_pixels(Handle, ref info, pixels, (IntPtr)rowBytes, ref nativeOptions, colorTable, ref colorTableCount)); }
// scanline (start) public SKCodecResult StartScanlineDecode(SKImageInfo info, SKCodecOptions options) { var nInfo = SKImageInfoNative.FromManaged(ref info); var nOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = options.FrameIndex, fPriorFrame = options.PriorFrame, }; var subset = default(SKRectI); if (options.HasSubset) { subset = options.Subset.Value; nOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_start_scanline_decode(Handle, &nInfo, &nOptions)); }
public unsafe SKCodecResult StartIncrementalDecode(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nativeOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = (IntPtr)options.FrameIndex, fHasPriorFrame = options.HasPriorFrame }; if (options.HasSubset) { var subset = options.Subset.Value; nativeOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_start_incremental_decode(Handle, ref info, pixels, (IntPtr)rowBytes, ref nativeOptions, colorTable, ref colorTableCount)); }
public SKCodecResult GetPixels(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nInfo = SKImageInfoNative.FromManaged(ref info); var nOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = options.FrameIndex, fPriorFrame = options.PriorFrame, }; var subset = default(SKRectI); if (options.HasSubset) { subset = options.Subset.Value; nOptions.fSubset = ⊂ } return(SkiaApi.sk_codec_get_pixels(Handle, &nInfo, (void *)pixels, (IntPtr)rowBytes, &nOptions)); }
public unsafe SKCodecResult GetPixels(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { if (pixels == IntPtr.Zero) { throw new ArgumentNullException(nameof(pixels)); } var nativeOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null, fFrameIndex = (IntPtr)options.FrameIndex, fHasPriorFrame = options.HasPriorFrame, fPremulBehavior = options.PremulBehavior, }; if (options.HasSubset) { var subset = options.Subset.Value; nativeOptions.fSubset = ⊂ } var cinfo = SKImageInfoNative.FromManaged(ref info); return(SkiaApi.sk_codec_get_pixels(Handle, ref cinfo, pixels, (IntPtr)rowBytes, ref nativeOptions, colorTable, ref colorTableCount)); }
public extern static SKCodecResult sk_codec_start_incremental_decode(sk_codec_t codec, ref SKImageInfo info, IntPtr pixels, IntPtr rowBytes, ref SKCodecOptionsInternal options, IntPtr ctableZero, IntPtr ctableCountZero);
public extern static SKCodecResult sk_codec_get_pixels(sk_codec_t codec, ref SKImageInfo info, IntPtr pixels, IntPtr rowBytes, ref SKCodecOptionsInternal options, IntPtr ctable, ref int ctableCount);
public unsafe SKCodecResult StartIncrementalDecode(SKImageInfo info, IntPtr pixels, int rowBytes, SKCodecOptions options, IntPtr colorTable, ref int colorTableCount) { if (pixels == IntPtr.Zero) throw new ArgumentNullException (nameof (pixels)); var nativeOptions = new SKCodecOptionsInternal { fZeroInitialized = options.ZeroInitialized, fSubset = null }; if (options.HasSubset) { var subset = options.Subset.Value; nativeOptions.fSubset = ⊂ } return SkiaApi.sk_codec_start_incremental_decode (Handle, ref info, pixels, (IntPtr)rowBytes, ref nativeOptions, colorTable, ref colorTableCount); }