Picture Box: Rotation?

Started by joern bosse, March 01, 2023, 08:21:15 AM

Previous topic - Next topic

joern bosse

Hello,
in my LISP example there are 2 images, one is squat aligned, one is cross aligned (you can see this in the ScreenShots).
How can I make a rotation of the image, for example 90

Fred Tomke

Hello, Joern,

I afraid, it is not possible to rotate an image within the picture box control. You have to rotate it before and then load it into the control.
Let me know if you need a lisp for that.

With regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Hello, Joern, me again,
do you always know, what is the right rotation? Isn't it neccessary to read out the orientation from the exif data (if stored)?
We had the same problem with photos made by employees with their mobile phones of damages on the (street) lane, on public trees and playgrounds (periodic checkups). When the photos had to be placed on reports they were wrong orientated or even stretched badly from portrait to landscape format. We solved that that way, that the photos are placed on a server from where a web service (IIS) could read the photos from. The application (report generator, in your case the OpenDCL app) called an aspx with the known image and a desired size, so the image was opened, the orientation was read to rotate the image (from portrait to landscape or reverse) and after that the image is resized to the desired size by remaining the original ratio. If the desired size was a landscape but the image was a portrait after rotation, the missing pixels left and right were added automatically. More words to write then to code. But in the end the result was right. I think, also your solution should be built that way: either by temporary image recalculation into a temp folder to load into a picturebox or by calling a php or aspx to show the result in a html-control.

I hope, you got some ideas.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

joern bosse

Hello Fred,
I was afraid that no rotation could be applied in the Picture Box.

Your further descriptions I could understand in something, but am not able at present to convert these ideas into a LISP program.

If you had a LISP example for me I could work my way in.
I will contact you by phone in any case.

Many greetings
J