B Benjie New Member Licensed User Jul 10, 2019 #1 Good day! Im a newbie. i just want to know how to get the return value for this codes? so that i can put it on the database. Code: Public Sub ImageToBytes(Image As Bitmap) As Byte() Dim out As OutputStream out.InitializeToBytesArray(0) Image.WriteToStream(out, 100, "JPEG") out.Close Return out.ToBytesArray End Sub Thanks! Last edited: Jul 10, 2019
Good day! Im a newbie. i just want to know how to get the return value for this codes? so that i can put it on the database. Code: Public Sub ImageToBytes(Image As Bitmap) As Byte() Dim out As OutputStream out.InitializeToBytesArray(0) Image.WriteToStream(out, 100, "JPEG") out.Close Return out.ToBytesArray End Sub Thanks!
DonManfred Expert Licensed User Longtime User Jul 10, 2019 #2 Code: dim bytes() as Byte = ImageToBytes(img) Upvote 0
B Benjie New Member Licensed User Jul 11, 2019 #3 DonManfred said: Code: dim bytes() as Byte = ImageToBytes(img) Click to expand... please give some example, where do i put this codes, thanks! Upvote 0
DonManfred said: Code: dim bytes() as Byte = ImageToBytes(img) Click to expand... please give some example, where do i put this codes, thanks!
DonManfred Expert Licensed User Longtime User Jul 11, 2019 #4 No. How should i? I do not have this code in my apps. It is YOU... So it should be YOU who should know where you want to use it. The question in this thread was on how to get the result from the given sub and i answered it with a working code. Upvote 0
No. How should i? I do not have this code in my apps. It is YOU... So it should be YOU who should know where you want to use it. The question in this thread was on how to get the result from the given sub and i answered it with a working code.
B Benjie New Member Licensed User Jul 11, 2019 #5 DonManfred said: No. How should i? I do not have this code in my apps. It is YOU... So it should be YOU who should know where you want to use it. The question in this thread was on how to get the result from the given sub and i answered it with a working code. Click to expand... Upvote 0
DonManfred said: No. How should i? I do not have this code in my apps. It is YOU... So it should be YOU who should know where you want to use it. The question in this thread was on how to get the result from the given sub and i answered it with a working code. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Jul 11, 2019 #6 Watch the SQL video tutorial: https://www.b4x.com/android/forum/threads/sql-tutorial.6736/ It shows how to insert blobs. Upvote 0
Watch the SQL video tutorial: https://www.b4x.com/android/forum/threads/sql-tutorial.6736/ It shows how to insert blobs.