1
인터넷에서 sdcard에 여러 이미지를 저장하고 데이터베이스에 경로를 저장하는 방법은 무엇입니까? 여러 이미지의 경우 어떻게해야합니까? 내가 한 지금 무슨 일이 될 때까지 ..데이터베이스에 이미지를 저장하는 방법
표 쿼리 아래는 생성 :
이 가 이 bmOptions = new BitmapFactory.Options();
bmOptions.inSampleSize = 1;
bm = Loadmage(image_URL, bmOptions);
mImageV.setImageBitmap(bm);
extStorageDirectory = Environment.getExternalStorageDirectory().toString();
OutputStream outStream = null;
File file = new File(extStorageDirectory, "er.PNG");
try{
outStream = new FileOutputStream(file);
bm.compress(Bitmap.CompressFormat.PNG, 100, outStream);
outStream.flush();
outStream.close();
}catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
그래서 모든 제목 같은 이미지가
하지만 하나 개의 값을 저장하기 위해 내가 삽입 한 것입니다
"create table table1 (_id integer primary key autoincrement, "
+ "title text not null, definition text not null, image BLOB not null);";
로 보여주는 중 ... 다른 제목의 다른 이미지를 표시하고 싶습니다.
문제가 있습니까? 하나의 레코드 당 하나의 경로를 데이터베이스에 저장합니까? db 테이블이 어떻게 생겼는지와 같은 질문에 좀 더 자세한 정보가 필요합니다. – aha