Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

BitmapFactory.DecodeByteArray ERROR on size about 10KB - 20KB

$
0
0

Good day to everyone! Every 5 seconds I run cycle with about 10 - 40 calling of next method for different ImageView and at some times I get BitmapFactory.DecodeByteArray ERROR. I have no any ideas to solve this. Why and where from it rises - sizes and dimension of picture is small - 200x200 dp and only 10 - 20 KB length size of input array!

public static Bitmap BitmapFromArray(byte[] array)
        {
            try
            {
            var options = new BitmapFactory.Options();

            Bitmap bitmap = BitmapFactory.DecodeByteArray(array, 0, array.Length, options);
            return bitmap;
            }
            catch (Exception e)
            {
                Core.Services.Log.Write("BitmapFactory.DecodeByteArray ERROR on size " + array.Length.ToString());
                return null;
            }
}

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>