Skip to content

Commit

Permalink
flutter#1 - Fixing GIF being exported as JPG issue
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondctc committed Mar 24, 2021
1 parent 9548bc2 commit bb001b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ String getPathFromUri(final Context context, final Uri uri) {
}

/** @return extension of image with dot, or default .jpg if it none. */
private static String getImageExtension(Context context, Uri uriImage) {
private static String getImageExtension(final Context context, Uri uriImage) {
String extension = null;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,11 @@ public void onPathReady(String path) {

private void handleImageResult(String path, boolean shouldDeleteOriginalIfScaled) {
if (methodCall != null) {
if (path.toLowerCase().endsWith(".gif")) {
finishWithSuccess(path);
return;
}

Double maxWidth = methodCall.argument("maxWidth");
Double maxHeight = methodCall.argument("maxHeight");
Integer imageQuality = methodCall.argument("imageQuality");
Expand Down

0 comments on commit bb001b5

Please sign in to comment.