visual basic 2013 rotate an image 90 degrees

RGuillermo
RGuillermo used Ask the Experts™
on
Hello Experts,
Please how can I rotate programatically an image in jpg or any format ?
Can this be done in visual basic...
if posible a few lines of source code,
just the main thing... we will adjust it here.
Regards,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
Do you want to rotate it and save over the original file?

...or just rotate it when displaying it on-screen somewhere?

WinForms?...WebForms?...WPF?...something else?

Details...
Top Expert 2015
Commented:
Once you have the image in a Bitmap object, simply use its RotateFlip method. Here is one example:

            Dim yourImage As New Bitmap("C:\Images\YourImage.jpg")
            yourImage.RotateFlip(RotateFlipType.Rotate90FlipNone)
            yourImage.Save("C:\Images\YourNewImage.jpg")
RGuillermoProject Manager

Author

Commented:
thanks to all experts!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial