Télécharger le zip
super programme , sans api ,bravo tres bien fait, felicitation 10/10
C'est terriblement LENT !!!! en utilisant des bitmabits je mets 0.391 sec pour désaturer une image en 2048 * 1536 !!!! penses aux BITMAPBITS !!!
Ce n'est peut être pas très rapide mais c'est très efficace ! Bravo, c'est ce que je cherchais. Ennixo: as tu un exemple utilisant les bitmapbits ?
Suffit de demander ! ' === DECLARATIONS === Public Type BITMAP bmType As Long bmWidth As Long bmHeight As Long bmWidthBytes As Long bmPlanes As Integer bmBitsPixel As Integer bmBits As Long End Type Public Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long Public Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long Public Declare Function SetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long ' === INVERSION === ' ce code est à mettre à l'endroit ou on veut inverser l'image ' dans un click de bouton par exemple ' P est la pictureBox contenant l'image qu'on veut inverser. ' AutoSize = True ' AutoRedraw = True Dim i As Long Dim iMax As Long GetObject P.Image, Len(PicInfo), PicInfo BytesPerLine = (PicInfo.bmWidth * 3 + 3) And &HFFFFFFFC ReDim PicBits(1 To BytesPerLine * PicInfo.bmHeight * 3) GetBitmapBits P.Image, UBound(PicBits), PicBits(1) iMax = UBound(PicBits) For i = 1 To iMax Step 4 PicBits(i) = Not PicBits(i) PicBits(i + 1) = Not PicBits(i + 1) PicBits(i + 2) = Not PicBits(i + 2) Next i SetBitmapBits P.Image, UBound(PicBits), PicBits(1) P.Refresh ' et voilà ! Il est a noté que pour plus de rapidité, il faut compiler le code ' et dans Projet > Propriétés, onglet Compilation ' il faut Optimiser pour la rapidité du code ' et dans ' Optimisations avancées : ' cocher toutes les cases.
Se souvenir du profil
Mot de passe oublié ? / Activation de compteCréer un compte
1 873 688 membres 205 nouveaux aujourd'hui 16 151 membres club