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

Bitmap decode byte array. Skia Decoder returns false

$
0
0

Hi everybody,

I'm having a problem when transforming a byte array image to a bitmap. Some images are not shown and others yes(always the same images). All images are RGB, have the same dimensions and are got from a Blob field in a SQLite database.

Debugging the process of transforming the byte array, the following error message is logged out:

[skia] --- decoder->decode returned false

I'm trying to modify my code

// Loads a Bitmap from a byte array
public static Bitmap bytesToBitmap (byte[] imageBytes)
{
    Bitmap bitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length);

    return bitmap;
}

However, I am unable to change some workarounds I've found here from java to C#. Could anyone help me?

Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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