How to determine image orientation using EXIF data

Is it possible to determine whether a jpg file needs to be rotated?

I would like to include a jpg into a PDF using GemBox.Pdf. Can I determine the orientation of the file based on the EXIF data and apply a rotation accordingly, so that the image is displayed correctly in the PDF?

I am working on ASP.NET Core 7.0 (Linux).

Hi Thomas,

Unfortunately, GemBox.Pdf currently doesn’t have support for this.
Please feel free to create a feature request for it:
But I’m afraid that at this moment, I cannot say exactly when this will become available.


Thanks, Mario!
I will try ImageMagick (
Best, Thomas