문제

I'd like to blend two images together using the Nokia Imaging SDK on WP8. For this, I need to set the blendFilter.ForegroundSource to an image type derived from IImageProvider. I tried using

Uri uri = new Uri("/images/background.jpg", UriKind.Relative);  
var imgSource = new BitmapImage(uri);
blendFilter.ForegroundSource = new BitmapImageSource(imgSource);

but BitmapImage does not implement IReadableBitmap.

How can I solve this?

도움이 되었습니까?

해결책

Have you tried using StorageFileImageSource?

string imageFile = @"images\background.jpg"
var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(imageFile);
blendFilter.ForegroundSource = new StorageFileImageSource(file))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top