با سلام
عکس های شما به صورت بایت توی دیتابیس ذخیره میشه
باید ابتدا عکس رو تبدیل به bitmap کنید و سپس بایت های عکس رو ذخیره کنید
این نمونه کد insert کردن یک عکس با اسم توی جدول
byte[] img = null;
Bitmap b = null; // your image goes here
ByteArrayOutputStream bos = new ByteArrayOutputStream();
b.compress(Bitmap.CompressFormat.PNG, 100, bos);
img = bos.toByteArray();
SQLiteStatement p = mydb.compileStatement("insert into pictures (name, image) values(?, ?)");
p.bindBlob(2, img);
p.bindString(1, "1.jpg");
p.execute();
این هم نمونه کد خواندن
byte[] img = null;
Cursor c = mydb.rawQuery("select * from pictures", null);
if(c.moveToLast()){
img = c.getBlob(2);
}
Bitmap b = BitmapFactory.decodeByteArray(img, 0, img.length);
imgView.setImageBitmap(b);