Number of images limit on a View? - mvvm

IvanositoIvanosito COMember ✭✭

Hi!
I created an App for taking pictures and sending them to a server. In my design, I add each photo to the View while taking them.
When I started testing the App, it happened that when I was showing 12 or more pics, the App crashes and vanishes!

I'm not using thumbnails, but the picture itself with a fixed width in the XAML so that it appears "small". Yet, these pics are small; aroun 50K to 100K per picture, since I handle size and quality % using Xam Plugin Media.

Is it that there is some sort of a limit for the amount of pics "showable" on a View?

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Test - Do the same thing with a bunch of images that are 24x24 pixels. Truly small images. See if it still happens.

    I'll bet you're just running out of memory. I usually display the free RAM in the status bar or header of my apps when in DEBUG so I can see if something is going bad.

  • N_BauaN_Baua INMember ✭✭✭✭✭

    Hi @Ivanosito,

    I guess the issue is with how you are trying to maintain the images. , I guess in-memory and every time you add a new image to the object/variable which stores the data is somehow creating a new instances or something. I am not sure if this is the exact issue you are facing, I've been in that pitfall accidentally sometime back.

    Check you code, if its all correct, may be you could try using some of the caching strategies supplied by Xamarin.
    A nice starting point is here:

    or try using the FFImageLoading - just only for the faster image loading and caching mechanics

    Hope it helps.

    -- N Baua

Sign In or Register to comment.