How to pass `System.Windows.Media.Imaging.BitmapSource` to `WicBitmapSource.FromSource()`
d2phap opened this issue · 2 comments
d2phap commented
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!
Is there any way to convert System.Windows.Media.Imaging.BitmapSource
to WicNet.WicBitmapSource
?
smourier commented
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)?
d2phap commented
Oh yeah, I was checking both repo! Created here: smourier/WicNet#2
Thank you!