Cropping Photo from photochooser task

3 posts, 0 answers
  1. Mohan Raj
    Mohan Raj avatar
    1 posts
    Member since:
    Jan 2013

    Posted 09 Nov 2013 Link to this post


    I want to prompt the user to pick the photos from gallery, then crop and save it to the isolated storage.. but it didn't work. shows excpetion as "Specified method is not supported" at

    wb.SaveJpeg(fileStream, wb.PixelWidth, wb.PixelHeight, 0, 100);

    Any help please.


    void pt_Completed(object sender, PhotoResult e)
        saveImage(e.ChosenPhoto, "customImage");
    private void saveImage(System.IO.Stream stream, string p)
        using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
            if (myIsolatedStorage.FileExists("/Shared/ShellContent/" + p + ".jpg"))
                myIsolatedStorage.DeleteFile("/Shared/ShellContent/" + p + ".jpg");
            IsolatedStorageFileStream fileStream = myIsolatedStorage.CreateFile("/Shared/ShellContent/" + p + ".jpg");
            BitmapImage bitmap = new BitmapImage();
            //WriteableBitmap wb = new WriteableBitmap(bitmap);
            cropImage(bitmap, fileStream);
    private async void cropImage(BitmapImage bitmap, IsolatedStorageFileStream fileStream)
        CropTool crp = new CropTool();
        crp.CropRect = new Rect(0.25, 0.25, 0.32, 0.68);
        WriteableBitmap wb = await crp.Apply(bitmap);
        wb.SaveJpeg(fileStream, wb.PixelWidth, wb.PixelHeight, 0, 100);

  2. Manuel
    Manuel avatar
    5 posts
    Member since:
    Mar 2012

    Posted 13 Nov 2013 Link to this post

    Same need with an image from the camera : take picture => crop or modify color => save in isolated storage

    thanks you very much

  3. DevCraft banner
  4. Deyan
    Deyan avatar
    2026 posts

    Posted 14 Nov 2013 Link to this post


    These are standard Windows Phone APIs. A thorough documentation on their usage is available on MSDN:

    I hope this helps.

    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Back to Top