Question

I am creating app that allow user to use pictures from photo hub & take new photo to edit

I know that I can take picture from PhotoChoserTask but I want 2 seperate things.

Now I need to crop taken picture right after capture (like what I can do with PhotoChoserTask)

How can I achieve it?

Was it helpful?

Solution

Unfortunately CameraCaptureTask doesn't have Height and Width properties, so you cannot crop the image right after it is taken. You can do two things:

1 - (I don't prefer this one!) Allow the user to take a picture using the CamerCaptureTask and then after it is completed, call the PhotoChoserTask so that the user again chooses the clicked image. Using this option you can crop the image using the Height and Width properties of the PhotoChoserTask

2 - Use Nokia Imaging SDK to crop the image. This SDK has many filters including the Crop filter which can be used to crop images. It is not as easy the PhotoChoserTask crop but you can still crop the image. There is sample code to crop an image on this page. Check it out!

Hope this helps!

OTHER TIPS

Same as PhotoChoserTask, CameraCapturTask also has 'completed' event. Both are same so you can apply the same code of PhotoChoserTask 'completed' event to CameraCaptureTask 'completed' event. Use 'e.ChosenPhoto' argument property to get the stream of captured image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top