public static void SetColorContexts(this IWICBitmapFrameEncode frame, IEnumerable <IWICColorContext> contexts) { if (frame == null) { throw new ArgumentNullException(nameof(frame)); } frame.SetColorContexts((contexts?.Count()).GetValueOrDefault(), contexts?.ToArray()).ThrowOnError(); }
public static void SetColorContexts(this IWICBitmapFrameEncode bitmapFrameEncode, IWICColorContext[] colorContexts) { bitmapFrameEncode.SetColorContexts(colorContexts.Length, colorContexts); }