-
-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The width and height of my image are reversed #2644
Comments
The width and height will be accurate. The EXIF metadata will indicate that the image is rotated. |
So ImageSharp will not help to reverse width and height? |
if you run the Note this is a difference stemming from audience expectations between image viewing and programmatic image manipulation. Image viewers are processing the data for humans to understand and physically look at where as ImageSharp is for manipulating the individual pixel data. Rotating the pixel data in memory (rather that adding a tag to tell a viewer to do it for you, which is the case here) would increase memory usage and loading time in places where not everyone will want/need that behaviour. |
For what it's worth, this has been discussed before. @JimBobSquarePants has an example of a quick program you can write to verify what they're saying, in #1613 |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.1.2
Other ImageSharp packages and versions
N/A
Environment (Operating system, version and so on)
Win10 22H2
.NET Framework version
.Net8.0
Description
The width and height of my image are reversed, the width should be 1080, and Height should be 1440.
Steps to Reproduce
Just load the attached image in 'IMG1.zip', And Check the Width and Height of the image:
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using SixLabors.ImageSharp.Processing;
var path = @"IMG1.jpg";
using var image = Image.Load(path);
Console.WriteLine(image.Width.ToString() + " x " + image.Height.ToString());
Images
IMG1.zip
The text was updated successfully, but these errors were encountered: