0

i have a problem by loading a image into PictureBox. I use VisualStudio 2015 without any extern components.

The image is displayed in the Explorer right.

When I load it in the PictureBox, it is automatically rotated. The same when i use Bitmap to load. Picture comes from IPhone, the size is 2448 × 3264px.

Any ideas to prevent this?

Here in preview and in picture box after load

In preview In PictureBox

Raktim Biswas
  • 4,011
  • 5
  • 27
  • 32
  • Picture in original to download: http://kleinanzeigentreff.de/IMG_3484.jpg – Michael Geschwill Aug 31 '16 at 06:46
  • Most likely the Image has the format you see in the PictureBox and explorer see and follows an Exif tag that tell it to rotate. PictureBox only follows the physical format. You will need to analyze athe exif info and rotate yourself. – TaW Aug 31 '16 at 07:27
  • You can see that it really is plandscape by looking at the info you show us.. (2448 × 3264) - Actually it seems to have [orientation=right top](http://sylvana.net/jpegcrop/exif_orientation.html) which means it is mirrored..?? - There are libraries out there to read exif info; maybe there is a.Net component as well.. – TaW Aug 31 '16 at 07:30
  • [See here for more hints](http://stackoverflow.com/questions/10494796/reading-exif-data-from-jpg) – TaW Aug 31 '16 at 07:36
  • 1
    @TaW I checked the image, the image has Exif orientation tag and should rotate using `Rotate90FlipNone` to show correctly. Windows Photo Viewer correct the image rotation, but the `PictureBox` doesn't correct it. I created a PictureBox which corrects the orientation and shows the image correctly. I shared the answer under the duplicate [post](http://stackoverflow.com/a/39247237/3110834). – Reza Aghaei Aug 31 '16 at 10:46
  • @MichaelG. Usually this happens when you rotate your camera when taking picture. The picture box in the linked post will solve the problem for you. – Reza Aghaei Aug 31 '16 at 11:04

0 Answers0