How to convert from PhotoResult to Bitmap in Nokia Imaging SDK? I wish to break an image into smaller images. The Bitmap class in Nokia.Graphics.Imaging has a constructor which takes another bitmap and a rectangle. I wish to use it. I cannot find any good examples on this. Please assist.

有帮助吗?

解决方案 2

Ah - you can first create an EditingSession with

var session = await EditingSessionFactory.CreateEditingSessionAsync(photoResult.ChosenPhoto);

(documentation here) and then render that to a Bitmap with RenderToBitmapAsync() (which has an overload that takes a Rect)

Hope that helps!

old answer:

I'm not sure what a PhotoResult is, but here's the documentation for the constructor you mentioned. What question do you have about it?

其他提示

In the new version 1.0 of the Nokia Imaging SDK, you can use StreamImageSource to read the ChosenPhoto stream.

NokiaImagingSDK 1.2

Bitmap bmp = null;
await streamImageSource.GetBitmapAsync(bmp, OutputOption.PreserveAspectRatio);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top