Skip to content

Commit feddde2

Browse files
committed
ImageUtil methods should all be static by convention
1 parent e280ac2 commit feddde2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utilcode/src/main/java/com/blankj/utilcode/utils/ImageUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public static Bitmap getBitmap(String filePath, int maxWidth, int maxHeight) {
243243
* @param is 输入流
244244
* @return bitmap
245245
*/
246-
public Bitmap getBitmap(InputStream is) {
246+
public static Bitmap getBitmap(InputStream is) {
247247
if (is == null) return null;
248248
return BitmapFactory.decodeStream(is);
249249
}
@@ -273,7 +273,7 @@ public static Bitmap getBitmap(InputStream is, int maxWidth, int maxHeight) {
273273
* @param offset 偏移量
274274
* @return bitmap
275275
*/
276-
public Bitmap getBitmap(byte[] data, int offset) {
276+
public static Bitmap getBitmap(byte[] data, int offset) {
277277
if (data.length == 0) return null;
278278
return BitmapFactory.decodeByteArray(data, offset, data.length);
279279
}
@@ -1488,4 +1488,4 @@ public static Bitmap compressBySampleSize(Bitmap src, int sampleSize, boolean re
14881488
if (recycle && !src.isRecycled()) src.recycle();
14891489
return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options);
14901490
}
1491-
}
1491+
}

0 commit comments

Comments
 (0)