mardi 14 avril 2015

cropping image universal app c#

i want to crop an image with x and y in universal app , i have searched alot and find nothing useful my idea is i have an image and i want to crop rectangle from it based on start x , y - end x and y


i have tried this



BitmapImage img = new BitmapImage(new Uri(file.Path));
WriteableBitmap topLeft = img.Crop(0, 0, halfWidth, halfHeight);


it say BitmapImage does not contain definition for crop


another thing : how can i convert BitmapImage to WriteableBitmap in universal app ?


Aucun commentaire:

Enregistrer un commentaire