locked
Using High resolution images application crashing Issue

    Question

  • hi

        I am using more than  70 to 80  high resolution Images(2 mb  to 4 mb) in application  from Picture library, when I use application  fastly then application become jerky and after some time it crash. when I use normal images without high resolution (size-200 kb to 300 kb ) then application working well with out any crash.

    Reading image code from picture library:-

    StorageFilefile = awaitStorageFile.GetFileFromPathAsync(imageUrl);

    using(StorageItemThumbnailthumbnail = awaitfile.GetThumbnailAsync(thumbnailMode, requestedSize, thumbnailOptions))

    {

    BitmapImage  imgSource = new BitmapImage();

    imgSource.SetSource(thumbnail);

    }

    I think Below code creating  problem when reading image from picture library. with out creating a thumanail. this code make my application jerky. When I remove this code application working fine.

    using (varfileStream = awaitfile.OpenAsync(Windows.Storage.FileAccessMode.Read))

    {

    imgSourceFullView = newBitmapImage();

     imgSourceFullView.SetSource(fileStream);

     }

        

    please tell me it is coding issue or some thing else

                               

                                       

                                       

                                       

                                   

                                

                                       

                                           

       



    • Edited by vinittyagi Monday, March 10, 2014 11:18 AM
    Monday, March 10, 2014 5:33 AM

Answers

  • Use thumbnails and the dynamically load large images as needed.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, March 11, 2014 12:22 PM
    Moderator

All replies

  • Why do you need to load all of the images at once?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, March 10, 2014 7:49 PM
    Moderator
  • I need to show thumbnail  all the images in gridview and their fullview show in flipview  in my application

    but when I use large size images and get that images from there path from picture libray then application become jerky or crash. but in case of small images it working fine.

     In case of thumbnail it working fine on large size images.

    I am really stuck. please tell if any solution you have......

    Tuesday, March 11, 2014 5:11 AM
  • Use thumbnails and the dynamically load large images as needed.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, March 11, 2014 12:22 PM
    Moderator