public static VP8StatusCode WebPDecode(IntPtr data, int data_size, ref WebPDecoderConfig webPDecoderConfig) { switch (IntPtr.Size) { case 4: return(WebPDecode_x86(data, (UIntPtr)data_size, ref webPDecoderConfig)); case 8: return(WebPDecode_x64(data, (UIntPtr)data_size, ref webPDecoderConfig)); default: throw new InvalidOperationException("Invalid platform. Can not find proper function"); } }
public static int WebPInitDecoderConfig(ref WebPDecoderConfig webPDecoderConfig) { switch (IntPtr.Size) { case 4: return(WebPInitDecoderConfigInternal_x86(ref webPDecoderConfig, WEBP_DECODER_ABI_VERSION)); case 8: return(WebPInitDecoderConfigInternal_x64(ref webPDecoderConfig, WEBP_DECODER_ABI_VERSION)); default: throw new InvalidOperationException("Invalid platform. Can not find proper function"); } }
private static extern VP8StatusCode WebPDecode_x64(IntPtr data, UIntPtr data_size, ref WebPDecoderConfig config);
private static extern int WebPInitDecoderConfigInternal_x64(ref WebPDecoderConfig webPDecoderConfig, int WEBP_DECODER_ABI_VERSION);