Android Question Read image from Database (SQL Server)

Discussion in 'Android Questions' started by Carles Escudé, Jun 25, 2015.

  1. Carles Escudé

    Carles Escudé Member Licensed User

    I have an image loaded in SQL Server in "image" datatype.

    I download it using an HttpJob and JSON.

    Which is the best way to load it in a imageview?

    Thanks in advance!
  2. Erel

    Erel Administrator Staff Member Licensed User

    Is it base 64 encoded?
  3. Carles Escudé

    Carles Escudé Member Licensed User

    No. It is not coded. It is saved as byte()

    I am trying this, but do not work:

    Dim p As JSONParser
    Dim list1 As List
    list1 = p.NextArray
    Dim map1 As Map
    map1 = list1.get(
    Dim IMG As String = map1.get("IMG")                
    Dim Buffer() As Byte = IMG.GetBytes("UTF8")
    Dim InputStream1 As InputStream
    0, Buffer.Length)
    Dim Bitmap1 As Bitmap
    logo.Bitmap = Bitmap1
    Error on Bitmap1.Initialize2(InputStream1) --> java.lang.RuntimeException: Error loading bitmap.
    Last edited: Jun 25, 2015
  4. Carles Escudé

    Carles Escudé Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice