B4A Library [Moved] xImageSliderIG

d3vc

Member
Thank you so much , Very interesting Library .
but i'm looking for how to load images (bloob) from mysql database .
 

Biswajit

Active Member
Licensed User
Longtime User
Thank you so much , Very interesting Library .
but i'm looking for how to load images (bloob) from mysql database .
Note: This thread has been moved to https://www.b4x.com/android/forum/t...nstagram-style-image-and-video-slider.119402/

Blob to image function:
Sub BlobToImage(Buffer() As Byte) as Bitmap
   Public InputStream1 As InputStream
   InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
   Public Bitmap1 As Bitmap
   Bitmap1.Initialize2(InputStream1)
   InputStream1.Close
   return Bitmap1
End Sub

Usage:
rs = sql1.ExecQuery("SELECT pic FROM table")
....
....
'code from library example
sc.items.Add(CreateMap("data":"Item 1", "image":BlobToImage(rs.GetBlob("pic"))))
....
sc.slider.setitems(sc.items)
....
 
Top