protected override unsafe void Dispose(bool disposing) { if (disposing) { Options.Dispose(); Options = null; } base.Dispose(disposing); }
/// <summary> /// Initializes a new instance of the <see cref="BitmapFrameEncode"/> class. /// </summary> /// <param name="encoder">The encoder.</param> /// <unmanaged>HRESULT IWICBitmapEncoder::CreateNewFrame([Out] IWICBitmapFrameEncode** ppIFrameEncode,[Out] IPropertyBag2** ppIEncoderOptions)</unmanaged> public BitmapFrameEncode(BitmapEncoder encoder) { Options = new BitmapEncoderOptions(IntPtr.Zero); encoder.CreateNewFrame(this, Options); }