Pivoter acquisition image

joe321 Messages postés 2 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 20 avril 2005 - 15 avril 2005 à 17:03
WariorProg Messages postés 18 Date d'inscription dimanche 9 mai 2004 Statut Membre Dernière intervention 15 décembre 2013 - 26 sept. 2005 à 21:47
Salut,





J'utilise la procedure suivante pour recuper le signal video de ma carte TV






Code:, ----
Private Const WM_CAP_DRIVER_CONNECT As Long = 1034

Private Const WM_CAP_GRAB_FRAME As Long = 1084

Private Const WM_CAP_EDIT_COPY As Long = 1054

Private Const WM_CAP_DRIVER_DISCONNECT = 1035

Private Const WM_CAP_SEQUENCE = 1086

Private Const WM_CAP_GET_SEQUENCE_SETUP = 1089

Private Const WM_CAP_SET_SEQUENCE_SETUP = 1088

Dim mCapHwnd As Long

Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long

Private Declare Function capCreateCaptureWindow Lib "avicap32.dll"
Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal
dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As
Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal nID As
Long) As Long

Private Declare Function SendMessage Lib "user32" Alias
"SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As
Long, lParam As Any) As Long

Private Sub Form_Load()

picOUT.ScaleMode = vbPixels

mCapHwnd = capCreateCaptureWindow("My Own Capture Window", 0, 0, 0, 320, 240, Me.hWnd, 0)

SendMessage mCapHwnd, WM_CAP_DRIVER_CONNECT, 0, 0

SendMessage mCapHwnd, WM_CAP_SEQUENCE, 0, 0

End Sub

Private Sub Timer1_Timer()

SendMessage mCapHwnd, WM_CAP_GRAB_FRAME, 0, 0

SendMessage mCapHwnd, WM_CAP_EDIT_COPY, 0, 0

picOUT.Picture = Clipboard.GetData(vbCFBitmap)

End Sub







La video est donc affiché dans un picturebox et je voudrais faire pivoter l'image de 90° dans le sens anti-horaire.





Merci d'avance pour votre aide

2 réponses

joe321 Messages postés 2 Date d'inscription lundi 6 octobre 2003 Statut Membre Dernière intervention 20 avril 2005
20 avril 2005 à 10:16
up
0
WariorProg Messages postés 18 Date d'inscription dimanche 9 mai 2004 Statut Membre Dernière intervention 15 décembre 2013
26 sept. 2005 à 21:47
Utilise la fonction GetPisel pour stocker les points de ton picturebox dans un tableau et utilise setPixel sur un autre picturebox avec les points du tableau mais dans un sens different cette fois ci.
tu enregistre tes points comme ca:

et tu les retrace comme ca:

et le tour est joué.
WariorProg
0
Rejoignez-nous