Closed sodiqjonovich closed 4 weeks ago
this is most likely due to some metadata tag setting a rotation (EXIF). We don't handle that automagically like windows/viewer software does.
You will want to call the img.Mutate(p=>p.AutoOrient())
helper to force the pixel into the correct orientation.
I should only get width and height of image, how can i get via this library
Also: #2644
I should only get width and height of image, how can i get via this library
The height and width of the image are the ones reported by the library. This is exactly the same as other libraries. If you want orientation dimensions you will have to check the image metadata.
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.1.4
Other ImageSharp packages and versions
3.1.4
Environment (Operating system, version and so on)
Windows 11, Linux Ubuntu
.NET Framework version
.net6
Description
This is my picture, in here width = 4282pixels, height = 5712 pixels. But In ImageSharp showing wrong
Steps to Reproduce
using (var imageSharp = SixLabors.ImageSharp.Image.Load(image.OpenReadStream()))
{
var width = imageSharp.Width;
var height = imageSharp.Height;
}
Images