|
Post by ptitjoz on Apr 16, 2019 16:06:10 GMT 1
Hello I would like to put a picture in a Sqlite database in Blob format and to read them again All this in Basic Converter Do you have an idea ? Best regards
|
|
|
Post by vovchik on Apr 16, 2019 16:45:25 GMT 1
Dear Ptitjoz, You can use BLOAD: DECLARE binary TYPE unsigned char* DECLARE binsize TYPE long DECLARE binfile$ TYPE STRING binfile$ = "test.png" binsize = FILELEN(binfile$) binary = BLOAD(binfile$) BSAVE binary TO "test1.png" SIZE binsize
I will leave the SQL part to you. With kind regards, vovchik
|
|
|
Post by ptitjoz on Apr 16, 2019 18:02:10 GMT 1
Hello vovchik for the sql I do not have any problems. For the rest, I did not understand everything ... Sorry .. At first I would just display a picture that is stored in my database. I made the appropriate SELECT and I get a variable BLOB (binary I guess, but store it in what?) And then I would like to display it with the IMAGE Widget .. Is it possible ? thanks for your help With my best regards
|
|
|
Post by vovchik on Apr 16, 2019 22:45:50 GMT 1
Dear ptitjoz, The attached source shows how to display binary data in a HUG IMAGE using a SUB called TEXT_IMG. You would obtain the BLOB data in a Bacon var (let's say blob_bin) of TYPE unsigned char* and then call TEXT_IMG (your_previously_defined_image_widget, blob_bin). It should work. With kind regards, vovchik
|
|