안드로이드 개발 질문/답변
(글 수 45,052)
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == 101) {
if (resultCode == Activity.RESULT_OK) {
LinearLayout layout = (LinearLayout)findViewById(R.id.PhoteLayout);
ImageView img = new ImageView(this);
Bitmap bitmap = (Bitmap)data.getExtras().get("data");// 이미지를 비트맵으로 받아옴.
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress( CompressFormat.JPEG, 75, stream);
byte[] byteArray = stream.toByteArray();
photoText = EncodingUtils.getString( byteArray, 0, byteArray.length, "Latin-1");
img.setImageBitmap(bitmap);
layout.addView(img);
}
}
}
디비로 저장될때 자꾸 싸이즈가 너무 크단 식으로 나와서 이부분이 잘못된것 아닌가 생각이 들어서
이렇게 글을 씁니다..
잘못된 부분이 있다면 좀 알려주세요...ㅠ