开发者

xna wp7 how to let the user crop his photo

hi how can i let the user to crop his picture before choosing one in the photoChooserTask?

开发者_开发问答 ( in msdn it says that the pixelheight/width doesn't work yet) thanks


You would have to do the pixel operations yourself after the image has selected. You can render the image to the screen, and then look for two touch points to determine the x/y and height/width ... then create a new texture with those dimensions and render to it as a RenderTarget. You can then save this new texture, or do whatever you need to do with it


Not sure if Windows Phone 7 can handle RenderTargets but if it can. You can just have the user drag a rectangle, create a RenderTarget of that size, and then draw to the RenderTarget using the rectangle as the source rectangle of the image you want to crop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜