How can you store an image in a SqlLite database? [closed]

1

I want to know if it is possible to store an image in a Sql Lite database. Thanks.

    
asked by PowerApp 16.11.2016 в 18:31
source

2 answers

4

The image would be saved as a bitmap array in a field that you have to define as BLOB

to get the bitmap array:

ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
bitmap.compress(CompressFormat.PNG, 0, outputStream);       
byte[] imagenDB = outputStream.toByteArray();
    
answered by 16.11.2016 в 19:53
-1

This link may help you:

I recommend that whenever you look for programming questions you will save looking for them in Spanish.

    
answered by 16.11.2016 в 18:57