How to store image in SQLite database

后端 未结 6 1705
一整个雨季
一整个雨季 2020-11-22 02:38

In my application I am uploading an image from gallery and I want to store this image in the SQLite database. How do I store a bitmap in the database? I am converting bitmap

6条回答
  •  清酒与你
    2020-11-22 03:12

    To store any image in sqlite database you need to store that image in byte array instead of string. Convert that image to byte array & store that byte [] to DB. While retrieving that image you will get byte [] convert that byte [] to bitmap by which you will get original image.

提交回复
热议问题