locked
Image editor and save that image in picture library RRS feed

  • Question

  • hi

    am edit my picture after that how to save that image in picture library...please give me solution 

    Thursday, September 12, 2013 6:35 AM

Answers

  • Hi, Sureshsri

    First, you can create decode an image to BitmapDecoder object. Then you can use BitmapDecoder edit the image. Refer to these links below:

    See how to decode an image:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj709934.aspx

    How to edit an image:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj709934.aspx

    When you finish edit your image, you can get an encoded image store as the InMemoryRandomAccessStream .If you want to store you image in Picturelibrary. You can code like below:

    StorageFile file1 = await folder.CreateFileAsync("MyImageFile.png", CreationCollisionOption.GenerateUniqueName);
    using (var fileStream1 = await file1.OpenAsync(FileAccessMode.ReadWrite))
    {
        await RandomAccessStream.CopyAndCloseAsync(myInMemoryRandomAccessStream.GetInputStreamAt(0), fileStream1.GetOutputStreamAt(0));
    }
    

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Anne Jing Wednesday, September 18, 2013 9:47 AM
    Friday, September 13, 2013 1:56 AM

All replies

  • Hello Sureshsri,

    Show this link, may be helpful for you:

    image-editing-using-aviary-sdk-in-windows-8-using-c#

    Thursday, September 12, 2013 6:41 AM
  • Hi, Sureshsri

    First, you can create decode an image to BitmapDecoder object. Then you can use BitmapDecoder edit the image. Refer to these links below:

    See how to decode an image:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj709934.aspx

    How to edit an image:

    http://msdn.microsoft.com/en-us/library/windows/apps/jj709934.aspx

    When you finish edit your image, you can get an encoded image store as the InMemoryRandomAccessStream .If you want to store you image in Picturelibrary. You can code like below:

    StorageFile file1 = await folder.CreateFileAsync("MyImageFile.png", CreationCollisionOption.GenerateUniqueName);
    using (var fileStream1 = await file1.OpenAsync(FileAccessMode.ReadWrite))
    {
        await RandomAccessStream.CopyAndCloseAsync(myInMemoryRandomAccessStream.GetInputStreamAt(0), fileStream1.GetOutputStreamAt(0));
    }
    

    Best Wishes!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Anne Jing Wednesday, September 18, 2013 9:47 AM
    Friday, September 13, 2013 1:56 AM