public static IWICMetadataQueryWriter CreateQueryWriterFromReader(this IWICImagingFactory imagingFactory, IWICMetadataQueryReader pIQueryReader, Guid?pguidVendor = null) { using (var pguidVendorPtr = CoTaskMemPtr.From(pguidVendor)) { return(imagingFactory.CreateQueryWriterFromReader(pIQueryReader, pguidVendorPtr)); } }
public static IWICBitmapEncoder CreateEncoder(this IWICImagingFactory factory, Guid guidContainerFormat, Guid?pguidVendor = null) { using (var pguidVendorPtr = CoTaskMemPtr.From(pguidVendor)) { return(factory.CreateEncoder(guidContainerFormat, pguidVendorPtr)); } }
public static IWICMetadataQueryWriter CreateQueryWriter(this IWICImagingFactory imagingFactory, Guid guidMetadataFormat, Guid?pguidVendor = null) { using (var pguidVendorPtr = CoTaskMemPtr.From(pguidVendor)) { return(imagingFactory.CreateQueryWriter(guidMetadataFormat, pguidVendorPtr)); } }
public static IWICBitmapDecoder CreateDecoderFromStream(this IWICImagingFactory imagingFactory, IStream pIStream, WICDecodeOptions metadataOptions, Guid?pguidVendor = null) { using (var pguidVendorPtr = CoTaskMemPtr.From(pguidVendor)) { return(imagingFactory.CreateDecoderFromStream(pIStream, pguidVendorPtr, metadataOptions)); } }
public static IWICBitmapDecoder CreateDecoderFromFilename(this IWICImagingFactory imagingFactory, string wzFilename, Guid?pguidVendor = null, WICDecodeOptions metadataOptions = WICDecodeOptions.WICDecodeMetadataCacheOnDemand) { using (var pguidVendorPtr = CoTaskMemPtr.From(pguidVendor)) { return(imagingFactory.CreateDecoderFromFilename(wzFilename, pguidVendorPtr, StreamAccessMode.GENERIC_READ, metadataOptions)); } }
public static void CopyPixels(this IWICBitmapSource bitmapSource, int cbStride, byte[] pbBuffer, WICRect?prc = null) { using (var prcPtr = CoTaskMemPtr.From(prc)) { bitmapSource.CopyPixels(prcPtr, cbStride, pbBuffer.Length, pbBuffer); } }
public static void WriteSource(this IWICBitmapFrameEncode bitmapFrameEncode, IWICBitmapSource pIBitmapSource, WICRect?prc = null) { using (var prcPtr = CoTaskMemPtr.From(prc)) { bitmapFrameEncode.WriteSource(pIBitmapSource, prcPtr); } }
public static IWICBitmapLock Lock(this IWICBitmap bitmap, WICBitmapLockFlags flags, WICRect?prcLock = null) { using (var prcLockPtr = CoTaskMemPtr.From(prcLock)) { return(bitmap.Lock(prcLockPtr, flags)); } }