Rotate an Image: RotateFlipType.RotateNoneFlipNone : RotateFlipType « 2D Graphics « VB.Net Tutorial






Rotate an Image: RotateFlipType.RotateNoneFlipNone
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class RotateNoneFlipNone
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

public class Form1
  Inherits System.Windows.Forms.Form

  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
        Dim newImage As Image = Image.FromFile("yourfile.jpg")

        newImage.RotateFlip(RotateFlipType.RotateNoneFlipNone)
        e.Graphics.DrawImage(newImage, New Rectangle(0, 0, 100, 100))
  End Sub

  Public Sub New()
   
    MyBase.New()
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(292, 273)
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen

  End Sub

End Class








17.81.RotateFlipType
17.81.1.Rotate an Image: RotateFlipType.Rotate90FlipNoneRotate an Image: RotateFlipType.Rotate90FlipNone
17.81.2.Rotate an Image: RotateFlipType.Rotate180FlipNoneRotate an Image: RotateFlipType.Rotate180FlipNone
17.81.3.Rotate an Image: RotateFlipType.Rotate270FlipNoneRotate an Image: RotateFlipType.Rotate270FlipNone
17.81.4.Rotate an Image: RotateFlipType.RotateNoneFlipNoneRotate an Image: RotateFlipType.RotateNoneFlipNone
17.81.5.Rotate an Image: RotateFlipType.RotateNoneFlipXRotate an Image: RotateFlipType.RotateNoneFlipX
17.81.6.Rotate an Image: RotateFlipType.RotateNoneFlipYRotate an Image: RotateFlipType.RotateNoneFlipY
17.81.7.Rotate an Image: RotateFlipType.RotateNoneFlipXYRotate an Image: RotateFlipType.RotateNoneFlipXY