Click here to Skip to main content
15,908,634 members

Comments by Bo Vistisen 2023 (Top 1 by date)

Bo Vistisen 2023 22-Dec-23 7:25am View    
Thank you Richard.

I can boil it down to only one line of code!
In VB: Dim bmpFoto As New System.Drawing.Bitmap(FullPathFilename)

I am running Windows 11 Home 23H2 from which I guess the Bitmap function comes from.
I have compiled my solution to .NET framework 4.0 and for 4.6.1.

My test is simple. From my smartphone I uploaded a picture to the desktop. It was taken in 3264x2488 and let us call this horizontal. Then I turned it 90 degrees and saves it as a 2488x3264 vertical copy. As I said, screen and curser showes the correct thumbnails and sizes.

Trying to read the vertical with Bitmap it keep given me a picture with the original horizontal size. I also tried it on a Windows 10 Home 22H2 with the same result.

All my computers is slowly but surely updated by Microsoft. Last correct version was, as I remember, created on a Windows 10 in VS2019 using .NET 4.0.

But where is this error?