AvatarBuilderImageHelper.java
4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package com.bitstrips.imoji.abv3.camera;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import java.io.File;
public class AvatarBuilderImageHelper
{
private static String a = AvatarBuilderImageHelper.class.getSimpleName();
public static boolean deleteImage(Context paramContext, String paramString)
{
return new File(getImagePath(paramContext, paramString)).delete();
}
public static String getImagePath(Context paramContext, String paramString)
{
return new File(paramContext.getFilesDir(), paramString).getPath();
}
public static Bitmap loadImage(String paramString)
{
BitmapFactory.Options localOptions = new BitmapFactory.Options();
localOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
return BitmapFactory.decodeFile(paramString, localOptions);
}
/* Error */
public static boolean saveImage(Context paramContext, Bitmap paramBitmap, String paramString)
{
// Byte code:
// 0: new 73 java/io/FileOutputStream
// 3: dup
// 4: aload_0
// 5: aload_2
// 6: invokestatic 28 com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper:getImagePath (Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
// 9: invokespecial 74 java/io/FileOutputStream:<init> (Ljava/lang/String;)V
// 12: astore_2
// 13: aload_2
// 14: astore_0
// 15: aload_1
// 16: getstatic 80 android/graphics/Bitmap$CompressFormat:PNG Landroid/graphics/Bitmap$CompressFormat;
// 19: bipush 100
// 21: aload_2
// 22: invokevirtual 86 android/graphics/Bitmap:compress (Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
// 25: pop
// 26: aload_2
// 27: invokevirtual 89 java/io/FileOutputStream:close ()V
// 30: iconst_1
// 31: ireturn
// 32: astore_0
// 33: getstatic 16 com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper:a Ljava/lang/String;
// 36: ldc 91
// 38: aload_0
// 39: invokestatic 97 android/util/Log:w (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
// 42: pop
// 43: goto -13 -> 30
// 46: astore_3
// 47: aconst_null
// 48: astore_1
// 49: aload_1
// 50: astore_0
// 51: getstatic 16 com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper:a Ljava/lang/String;
// 54: ldc 99
// 56: aload_3
// 57: invokestatic 102 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
// 60: pop
// 61: aload_1
// 62: ifnull +7 -> 69
// 65: aload_1
// 66: invokevirtual 89 java/io/FileOutputStream:close ()V
// 69: iconst_0
// 70: ireturn
// 71: astore_0
// 72: getstatic 16 com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper:a Ljava/lang/String;
// 75: ldc 91
// 77: aload_0
// 78: invokestatic 97 android/util/Log:w (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
// 81: pop
// 82: goto -13 -> 69
// 85: astore_1
// 86: aconst_null
// 87: astore_0
// 88: aload_0
// 89: ifnull +7 -> 96
// 92: aload_0
// 93: invokevirtual 89 java/io/FileOutputStream:close ()V
// 96: aload_1
// 97: athrow
// 98: astore_0
// 99: getstatic 16 com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper:a Ljava/lang/String;
// 102: ldc 91
// 104: aload_0
// 105: invokestatic 97 android/util/Log:w (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
// 108: pop
// 109: goto -13 -> 96
// 112: astore_1
// 113: goto -25 -> 88
// 116: astore_3
// 117: aload_2
// 118: astore_1
// 119: goto -70 -> 49
// Local variable table:
// start length slot name signature
// 0 122 0 paramContext Context
// 0 122 1 paramBitmap Bitmap
// 0 122 2 paramString String
// 46 11 3 localIOException1 java.io.IOException
// 116 1 3 localIOException2 java.io.IOException
// Exception table:
// from to target type
// 26 30 32 java/io/IOException
// 0 13 46 java/io/IOException
// 65 69 71 java/io/IOException
// 0 13 85 finally
// 92 96 98 java/io/IOException
// 15 26 112 finally
// 51 61 112 finally
// 15 26 116 java/io/IOException
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/camera/AvatarBuilderImageHelper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/