Skip to content

Use more meaningful overload names for WinRT APIs #4490

@riverar

Description

@riverar

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-WCRWindows App SDK integration with Windows AI APIs for OCR, image & text analysis etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions