Ma solution:
Public Function RotateImage(ByRef image As Image, ByVal offset As PointF, ByVal angle As Decimal) As Bitmap
If image Is Nothing Then
Throw New ArgumentNullException("image")
End If
''create a new empty bitmap to hold rotated image
Dim rotatedBmp As Bitmap = New Bitmap(image.Width, image.Height)
'Dim rotatedBmp As Bitmap = New Bitmap(image)
rotatedBmp.SetResolution(image.HorizontalResolution, image.VerticalResolution)
''make a graphics object from the empty bitmap
Dim g As Graphics = Graphics.FromImage(rotatedBmp)
''Put the rotation point in the center of the image
g.TranslateTransform(offset.X, offset.Y)
''rotate the image
g.RotateTransform(angle)
''move the image back
g.TranslateTransform(-offset.X, -offset.Y)
''draw passed in image onto graphics object
'g.DrawImage(image, New PointF(0, 0))
g.DrawImage(image, offset)
Return rotatedBmp
End Function
Vous devez utiliser les méthodes GDI pour le faire. Voir [cet article] (http://www.codeproject.com/Articles/58815/C-Image-PictureBox-Rotations) – FloatingKiwi
Vous pouvez avoir votre réponse dans ce [sujet] (https://social.msdn.microsoft. com/Forums/vstudio/fr-FR/e8fccfc0-10e4-44bf-97d4-601b22908835/rotate-image-image-at-25-degree-using-vbnet-2008? forum = vbgeneral) – Hadi
Copie possible de [Rotation d'une image dans une boîte d'image] (https://stackoverflow.com/questions/40431154/rotating-an-image-in-a-picture-box) –