internal static string FetchString(this FetchIntoBuffer <char> fetcher) { var buffer = fetcher.FetchArray(); int length = buffer.Length - 1; if (length > 0) { return(new string(buffer, 0, length)); } else if (length == 0) { return(string.Empty); } else { return(null); } }
public static int[] GetColors(this IWICPalette palette) { FetchIntoBuffer <int> fetcher = palette.GetColors; return(fetcher.FetchArray()); }
public static byte[] GetProfileBytes(this IWICColorContext colorContext) { FetchIntoBuffer <byte> fetcher = colorContext.GetProfileBytes; return(fetcher.FetchArray()); }
public static Guid[] GetPixelFormats(this IWICFormatConverterInfo formatConverterInfo) { FetchIntoBuffer <Guid> fetcher = formatConverterInfo.GetPixelFormats; return(fetcher.FetchArray()); }
public static Guid[] GetContainerFormats(this IWICMetadataHandlerInfo metadataHandlerInfo) { FetchIntoBuffer <Guid> fetcher = metadataHandlerInfo.GetContainerFormats; return(fetcher.FetchArray()); }
public static IWICColorContext[] GetColorContexts(this IWICBitmapFrameDecode bitmapFrameDecode) { FetchIntoBuffer <IWICColorContext> fetcher = bitmapFrameDecode.GetColorContexts; return(fetcher.FetchArray()); }