1

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.

David Božjak
  • 16,887
  • 18
  • 67
  • 98
rahulroy9202
  • 2,730
  • 3
  • 32
  • 45

3 Answers3

2

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

CÅdahl
  • 442
  • 3
  • 13
1

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?

gregstoll
  • 1,318
  • 9
  • 14
  • PhotoResult is the class of the object returned when using a PhotoChooser task in Windows Phone. The documentation provided there is inadequate for this scenario. – rahulroy9202 Oct 30 '13 at 18:46
0

NokiaImagingSDK 1.2

Bitmap bmp = null;
await streamImageSource.GetBitmapAsync(bmp, OutputOption.PreserveAspectRatio);
sangeek
  • 223
  • 1
  • 2
  • 4