Skip to content

Adding CreateBitmapSourceFromWICBitmap method to System.Windows.Interop.Imaging #7223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lindexi
Copy link
Member

@lindexi lindexi commented Oct 22, 2022

Fixes #7217

Description

Adding CreateBitmapSourceFromWICBitmap method to System.Windows.Interop.Imaging.

Customer Impact

We can use System.Windows.Interop.Imaging.CreateBitmapSourceFromWICBitmapSource to create the BitmapSource from WICBitmapSource. And the WICBitmapSource can be created by other logic, such as D2D logic

Regression

None.

Testing

CI and my demo code.

My demo code: https://github.com/lindexi/lindexi_gd/tree/60d5324219fef0b55ef6eb130e0c7a698554eab5/WpfVorticeWicTest

Risk

Adding the API and I do not change any behavior.

Microsoft Reviewers: Open in CodeFlow

@lindexi lindexi requested a review from a team as a code owner October 22, 2022 03:37
@ghost ghost assigned lindexi Oct 22, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Oct 22, 2022
@ghost ghost requested review from dipeshmsft and singhashish-wpf October 22, 2022 03:38
@ghost ghost added the Community Contribution A label for all community Contributions label Oct 22, 2022
@miloush
Copy link
Contributor

miloush commented Nov 10, 2022

What happens if the bitmap source uses pixel format that WPF does not support?

@miloush
Copy link
Contributor

miloush commented Nov 10, 2022

Shouldn't you freeze the UnmanagedBitmapWrapper before returning it?

@lindexi
Copy link
Member Author

lindexi commented Nov 11, 2022

@miloush Thank you. But the CreateBitmapSourceFromHIcon do not freeze.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Review Requested Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal] Adding CreateBitmapSourceFromWICBitmap method to System.Windows.Interop.Imaging
3 participants