반응형
Bitmap Drawable 변환
Bitmap bitmap = BitmapFactory.decodeFile(“/sdcard/test.jpg”);
Drawable drawable = new BitmapDrawable(bitmap);
비트맵을 Drawble로 변환시
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor was deprecated in API level 4. Use BitmapDrawable(Resources) to ensure that the drawable has correctly set its target density. | |||||||||||
Create an empty drawable, setting initial target density based on the display metrics of the resources. | |||||||||||
This constructor was deprecated in API level 4. Use BitmapDrawable(Resources, Bitmap) to ensure that the drawable has correctly set its target density. | |||||||||||
Create drawable from a bitmap, setting initial target density based on the display metrics of the resources. | |||||||||||
This constructor was deprecated in API level 5. Use BitmapDrawable(Resources, String) to ensure that the drawable has correctly set its target density. | |||||||||||
Create a drawable by opening a given file path and decoding the bitmap. | |||||||||||
This constructor was deprecated in API level 5. Use BitmapDrawable(Resources, java.io.InputStream) to ensure that the drawable has correctly set its target density. | |||||||||||
Create a drawable by decoding a bitmap from the given input strea |
출처 : http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html
반응형
'Programming > Android' 카테고리의 다른 글
Android SharedPreferences 암호화 랩퍼 (0) | 2013.12.17 |
---|---|
안드로이드(Android) 프레임 애니메이션 (0) | 2013.12.11 |
gridview click 이벤트 onItemClick 작동 오류 (0) | 2013.12.07 |
NDK Plugin 사용 (0) | 2013.11.24 |
Android NDK 소개 (0) | 2013.11.23 |