@mmdevelopment,
Here is a work-around for you:
private static MemoryStream AutoRotateImage(byte[] imageBytes)
{
var testStream = new MemoryStream(imageBytes)
{
Position = 0
};
using var image = Aspose.Imaging.Image.Load(testStream);
// there is enum ExifOrientation that specifies image rotation
// ExifOrientation values are enumerated from 1 to 8, so any other value causes exception
// in this case input image has exif.Orientation value of 0, so exception is thrown
if (image is JpegImage jpeg && jpeg.ExifData is JpegExifData exif && Enum.IsDefined<ExifOrientation>(exif.Orientation))
{
jpeg.AutoRotate();
testStream = new MemoryStream();
jpeg.Save(testStream);
testStream.Position = 0;
}
return testStream;
}