S shhammer5634 Member Licensed User Longtime User Dec 4, 2018 #1 Hello all, This is my first post and my first project in B4A. So far I've been able to find the answers to my questions here in the forums. To those who have answered all those questions, my profound thanks. My issue is this: I'm taking a small jpeg picture and storing it as a blob in a table. That part I've got no problem. And I can reload the image into a byte array from the table. How do I take that byte array which is a jpeg image and get it into an imageview. I'm missing a step somewhere and I don't seem to be able to word my search inquiries well enough to find what I'm looking for. Thanks for the assistance. Steve Hammer
Hello all, This is my first post and my first project in B4A. So far I've been able to find the answers to my questions here in the forums. To those who have answered all those questions, my profound thanks. My issue is this: I'm taking a small jpeg picture and storing it as a blob in a table. That part I've got no problem. And I can reload the image into a byte array from the table. How do I take that byte array which is a jpeg image and get it into an imageview. I'm missing a step somewhere and I don't seem to be able to word my search inquiries well enough to find what I'm looking for. Thanks for the assistance. Steve Hammer
DonManfred Expert Licensed User Longtime User Dec 4, 2018 #2 Code: Dim image() As Byte ' fill this with the data from your blob (the bytearray) Dim ins As InputStream ins.InitializeFromBytesArray(image,0,image.Length) Dim bmp As Bitmap bmp.Initialize2(ins) Hope you get the principle. Upvote 0
Code: Dim image() As Byte ' fill this with the data from your blob (the bytearray) Dim ins As InputStream ins.InitializeFromBytesArray(image,0,image.Length) Dim bmp As Bitmap bmp.Initialize2(ins) Hope you get the principle.
S shhammer5634 Member Licensed User Longtime User Dec 4, 2018 #3 Hi Don, I do get the principal, and I've seen this although I haven't tried it. My concern was in defining the image as a bitmap since it's a jpeg. Do I gather that imageview is smart enough to figure out that it's a jpeg? Thanks Upvote 0
Hi Don, I do get the principal, and I've seen this although I haven't tried it. My concern was in defining the image as a bitmap since it's a jpeg. Do I gather that imageview is smart enough to figure out that it's a jpeg? Thanks
DonManfred Expert Licensed User Longtime User Dec 4, 2018 #4 shhammer5634 said: Do I gather that imageview is smart enough to figure out that it's a jpeg? Click to expand... The imageview needs a bitmap. And you are creating the bitmap. The Bitmap object is smart enough. Upvote 0
shhammer5634 said: Do I gather that imageview is smart enough to figure out that it's a jpeg? Click to expand... The imageview needs a bitmap. And you are creating the bitmap. The Bitmap object is smart enough.
S shhammer5634 Member Licensed User Longtime User Dec 4, 2018 #5 DonManfred said: The imageview needs a bitmap. And you are creating the bitmap. The Bitmap object is smart enough. Click to expand... Excellent. Thanks! Upvote 0
DonManfred said: The imageview needs a bitmap. And you are creating the bitmap. The Bitmap object is smart enough. Click to expand... Excellent. Thanks!
DonManfred Expert Licensed User Longtime User Dec 4, 2018 #6 shhammer5634 said: My concern was in defining the image as a bitmap since it's a jpeg Click to expand... Don´t get confused with the BMP Format and Bitmap. They are different things. Upvote 0
shhammer5634 said: My concern was in defining the image as a bitmap since it's a jpeg Click to expand... Don´t get confused with the BMP Format and Bitmap. They are different things.
S shhammer5634 Member Licensed User Longtime User Dec 4, 2018 #7 DonManfred said: Don´t get confused with the BMP Format and Bitmap. They are different things. Click to expand... I'll remember that. That's why I asked the experts. Upvote 0
DonManfred said: Don´t get confused with the BMP Format and Bitmap. They are different things. Click to expand... I'll remember that. That's why I asked the experts.