0
한 폴더에 저장된 모든 이미지를 base64
데이터로 변환하려면 어떻게해야합니까? 다음 코드에서 tFotos
은 내 모든 이미지가 저장되는 폴더입니다.base64 이미지
ArrayList<String> mList = new ArrayList<String>();
Bitmap selectedImage = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory()+"tFotos");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
selectedImage.compress(Bitmap.CompressFormat.JPEG, 100,
stream);
byte[] byteArray = stream.toByteArray();
String strBase64 = Base64.encodeToString(byteArray, 0);
mList.add(StrBase64);