How can you display MySQL BLOB Images in a Xamarin Imageview?

I have converted my imageview to a bitmap and then to a byte array. The image is then stored in a MySQL database as a BLOB.

Bitmap bmp = ((BitmapDrawable)ivTest.Drawable).Bitmap;

        MemoryStream stream = new MemoryStream();
        bmp.Compress(Bitmap.CompressFormat.Png, 0, stream);
        byte[] bitmapData = stream.ToArray();

What I want to do is fetch this BLOB image and display it in another ImageView. Can I do this by using an SQL query?

Sign In or Register to comment.