예제 #1
0
        protected override unsafe void Dispose(bool disposing)
        {
            if (disposing)
            {
                Options.Dispose();
                Options = null;
            }

            base.Dispose(disposing);
        }
예제 #2
0
        /// <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);
        }