2

WP8 で Nokia Imaging SDK を使用して 2 つの画像をブレンドしたいと考えています。このためには、blendFilter.ForegroundSource を IImageProvider から派生した画像タイプに設定する必要があります。使ってみた

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

BitmapImage は IReadableBitmap を実装していません。

どうすればこれを解決できますか?

4

1 に答える 1

4

StorageFileImageSource を使用してみましたか?

string imageFile = @"images\background.jpg"
var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(imageFile);
blendFilter.ForegroundSource = new StorageFileImageSource(file))
于 2013-12-14T18:00:51.967 に答える