Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7 (WP7) PhotoChooserTask with Crop

I've seen this in a number of apps but can't find anything in the documentation or online samples.

When you invoke the PhotoChooserTask some apps enable you to resize / crop to use only a portion of that image (by showing a white rectangle). How can I use this and set my own dimensions for the target image?

like image 567
unicorn_crack Avatar asked Mar 22 '11 12:03

unicorn_crack


3 Answers

You can set the width and height of the desired image and the PhotoChooserTask will automatically create the crop mechanism.

photoChooser.PixelHeight = 500;
photoChooser.PixelWidth = 500;

There are some known issues with this method in the pre-nodo emulator; using the 7.1.1 tools I have not had any problems with this method.

like image 173
Nate Avatar answered Sep 19 '22 22:09

Nate


Those apps will be doing the cropping themselves. There is not built in way to crop images.

like image 35
Matt Lacey Avatar answered Sep 21 '22 22:09

Matt Lacey


Go to this MSDN site and download Photos Sample .It describes in detail How to crop. Hope this helps.

like image 1
Vaysage Avatar answered Sep 22 '22 22:09

Vaysage