(Android) Assets에서 Bitmap 읽어오기
public Bitmap assetsRead(String file) { InputStream is; Bitmap bitmap = null; try { is = mContext.getAssets().open(file); int size = is.available(); byte[] buffer = new byte[size]; is.read(buffer); is.close(); bitmap = BitmapFactory.decodeByteArray( buffer, 0, buffer.length ) ; bitmap = Bitmap.createScaledBitmap(bitmap, 300, 340, true); } catch (IOException e) { e.printStackTrace(); } return bit..
개발/개발 자료
2014. 3. 24. 17:55