Skip to content

Commit

Permalink
WPMediaUtils - Set normal orientation for the exif data
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Jul 1, 2024
1 parent 46e46be commit e219165
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.FileProvider;
import androidx.exifinterface.media.ExifInterface;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;

Expand Down Expand Up @@ -84,6 +85,9 @@ public static Uri getOptimizedMedia(Context context, String path, boolean isVide
AppLog.e(AppLog.T.EDITOR, "Optimized picture was null!");
AnalyticsTracker.track(AnalyticsTracker.Stat.MEDIA_PHOTO_OPTIMIZE_ERROR);
} else {
// Set the default orientation tag for the EXIF data
exifData.put("Orientation", String.valueOf(ExifInterface.ORIENTATION_NORMAL));

// Write EXIF data to the new image
ExifUtils.writeExifData(exifData, optimizedPath);

Expand Down

0 comments on commit e219165

Please sign in to comment.