Pregunta

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.

¿Fue útil?

Solución 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?

Otros consejos

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);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top