Permalink
Browse files

Merge pull request #115 from c0state/make_imageutil_methods_static

ImageUtil methods should all be static by convention
  • Loading branch information...
2 parents 45ab964 + feddde2 commit ee5103239d9d19474e0ca456679f8e6ecf4b9fa9 @Blankj committed on GitHub Jan 8, 2017
Showing with 3 additions and 3 deletions.
  1. +3 −3 utilcode/src/main/java/com/blankj/utilcode/utils/ImageUtils.java
@@ -243,7 +243,7 @@ public static Bitmap getBitmap(String filePath, int maxWidth, int maxHeight) {
* @param is 输入流
* @return bitmap
*/
- public Bitmap getBitmap(InputStream is) {
+ public static Bitmap getBitmap(InputStream is) {
if (is == null) return null;
return BitmapFactory.decodeStream(is);
}
@@ -273,7 +273,7 @@ public static Bitmap getBitmap(InputStream is, int maxWidth, int maxHeight) {
* @param offset 偏移量
* @return bitmap
*/
- public Bitmap getBitmap(byte[] data, int offset) {
+ public static Bitmap getBitmap(byte[] data, int offset) {
if (data.length == 0) return null;
return BitmapFactory.decodeByteArray(data, offset, data.length);
}
@@ -1488,4 +1488,4 @@ public static Bitmap compressBySampleSize(Bitmap src, int sampleSize, boolean re
if (recycle && !src.isRecycled()) src.recycle();
return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options);
}
-}
+}

0 comments on commit ee51032

Please sign in to comment.