Skip to content

Commit

Permalink
Merge pull request #21024 from wordpress-mobile/fix/exif-orientation-…
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
oguzkocer authored Jul 4, 2024
2 parents 58d5813 + e219165 commit b75d3a3
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 b75d3a3

Please sign in to comment.