336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
01./** Get Bitmap's Width **/
02.public static int getBitmapOfWidth( String fileName ){
03.try {
04.BitmapFactory.Options options = new BitmapFactory.Options();
05.options.inJustDecodeBounds = true;
06.BitmapFactory.decodeFile(fileName, options);
07.return options.outWidth;
08.} catch(Exception e) {
09.return 0;
10.}
11.}
12.
13./** Get Bitmap's height **/
14.public static int getBitmapOfHeight( String fileName ){
15.
16.try {
17.BitmapFactory.Options options = new BitmapFactory.Options();
18.options.inJustDecodeBounds = true;
19.BitmapFactory.decodeFile(fileName, options);
20.
21.return options.outHeight;
22.} catch(Exception e) {
23.return 0;
24.}
25.}
[출처] 안드로이드펍 SSamDDak님의 답변
'Programming > Android' 카테고리의 다른 글
| [Android] Bitmap, byte[] 간의 변환 (5) | 2011.02.18 |
|---|---|
| [Android] CustomView 만들기 (0) | 2011.02.15 |
| [Android] Screen Size (0) | 2011.01.26 |
| [Android] LockableMessageHandler (0) | 2011.01.24 |
| [Android] android:textAppearance 사용하기 (0) | 2011.01.24 |