smourier/DirectN

How to pass `System.Windows.Media.Imaging.BitmapSource` to `WicBitmapSource.FromSource()`

d2phap opened this issue · 2 comments

Hi, I'm playing around with this library on .NET 6
I use Magick.NET to read the image, then convert it to System.Windows.Media.Imaging.BitmapSource.

using var imgM = new MagickImage("photo.png");
System.Windows.Media.Imaging.BitmapSource src = imgM.ToBitmapSource();


using var bmp = WicBitmapSource.FromSource(src); // ERROR!

image

Is there any way to convert System.Windows.Media.Imaging.BitmapSource to WicNet.WicBitmapSource?

Hi,

Aren't you confusing with this library : https://github.com/smourier/wicnet (if yes, can you delete this one and recreate the same over there)?

Oh yeah, I was checking both repo! Created here: smourier/WicNet#2
Thank you!