snickers54
Messages postés4Date d'inscriptionvendredi 1 septembre 2006StatutMembreDernière intervention 4 janvier 2007
-
3 janv. 2007 à 11:45
snickers54
Messages postés4Date d'inscriptionvendredi 1 septembre 2006StatutMembreDernière intervention 4 janvier 2007
-
4 janv. 2007 à 16:26
Bonjour.
Dans le cadre d'un logiciel de gestion graphique, je dois a un moment
donné récupérer une zone précise d'un bitmap, mais je ne sais pas
comment faire .. quelqu'un pourrait-il me donner une solution
Private Function RecadrerImage(ByVal ImgSource As System.Drawing.Image, _
ByVal Rect As System.Drawing.Rectangle) As System.Drawing.Image
If ImgSource IsNot Nothing Then
Dim ImgOut As System.Drawing.Image = New System.Drawing.Bitmap(Rect.Width, Rect.Height)
Dim Graphics As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(ImgOut)
Graphics.DrawImage(ImgSource, 0, 0, Rect, System.Drawing.GraphicsUnit.Pixel)
Return ImgOut
End If
Return Nothing
End Function,