Upcoming Windows Vision, AI, etc. APIs are getting added to Windows App SDK/Runtime with sub-optimal method overload names. This makes use of these APIs outside of C# more difficult/annoying.
(We previously discussed a similar API wart in this repository.)
// From Microsoft.Windows.Imaging
internal interface ITrimapImageSegmenter
{
[Overload("RemoveBackgroundAsync")]
IAsyncOperation<SoftwareBitmap> RemoveBackgroundAsync([In] SoftwareBitmap softwareBitmap, [In] SoftwareBitmap fgMask, [In] SoftwareBitmap bgMask);
[Overload("RemoveBackground")]
SoftwareBitmap RemoveBackground([In] SoftwareBitmap softwareBitmap, [In] SoftwareBitmap fgMask, [In] SoftwareBitmap bgMask);
- [Overload("RemoveBackgroundAsync2")]
IAsyncOperation<ImageBuffer> RemoveBackgroundAsync([In] ImageBuffer imageBuffer, [In] ImageBuffer fgMask, [In] ImageBuffer bgMask);
- [Overload("RemoveBackground2")]
ImageBuffer RemoveBackground([In] ImageBuffer imageBuffer, [In] ImageBuffer fgMask, [In] ImageBuffer bgMask);
}
Upcoming Windows Vision, AI, etc. APIs are getting added to Windows App SDK/Runtime with sub-optimal method overload names. This makes use of these APIs outside of C# more difficult/annoying.
(We previously discussed a similar API wart in this repository.)
// From Microsoft.Windows.Imaging internal interface ITrimapImageSegmenter { [Overload("RemoveBackgroundAsync")] IAsyncOperation<SoftwareBitmap> RemoveBackgroundAsync([In] SoftwareBitmap softwareBitmap, [In] SoftwareBitmap fgMask, [In] SoftwareBitmap bgMask); [Overload("RemoveBackground")] SoftwareBitmap RemoveBackground([In] SoftwareBitmap softwareBitmap, [In] SoftwareBitmap fgMask, [In] SoftwareBitmap bgMask); - [Overload("RemoveBackgroundAsync2")] IAsyncOperation<ImageBuffer> RemoveBackgroundAsync([In] ImageBuffer imageBuffer, [In] ImageBuffer fgMask, [In] ImageBuffer bgMask); - [Overload("RemoveBackground2")] ImageBuffer RemoveBackground([In] ImageBuffer imageBuffer, [In] ImageBuffer fgMask, [In] ImageBuffer bgMask); }