Skip to content

Commit

Permalink
add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
sw926 committed Nov 2, 2017
1 parent e951887 commit 42c38a4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class ImageUtils {

public static Bitmap compressImageFile(String srcFile, int maxWidth, int maxHeight) {
@Nullable
public static Bitmap compressImageFile(@NonNull String srcFile, int maxWidth, int maxHeight) {
Bitmap bitmap = null;

long inputFileLength = new File(srcFile).length();
Expand Down Expand Up @@ -104,7 +107,6 @@ public static Bitmap compressImageFile(String srcFile, int maxWidth, int maxHeig
return bitmap;
}


public static void saveBitmap(Bitmap bmp, String filePath, Bitmap.CompressFormat format, int quality) {
FileOutputStream fo;
try {
Expand Down

0 comments on commit 42c38a4

Please sign in to comment.