Mushroom Realm
Jul 6th, 2002, 06:56 PM
Im used this code and it didnt work. im trying to invert the image
Public Sub mnuInvert_Click()
Dim Pixels() As RGBTriplet
Dim X As Integer
Dim Y As Integer
Dim Bits As Integer
GetPixel Picture1, X, Y
For X = 0 To Picture1.ScaleWidth
For Y = 0 To Picture1.ScaleHeight
With Pixels(X, Y)
.rgbRed = 255 - .rgbRed
.rgbGreen = 255 - .rgbGreen
.rgbBlue = 255 - .rgbBlue
End With
Next Y
Next X
SetPixel Picture1, X, Y, Bits
Picture1.Picture = Picture1.Image
End Sub
does anyone know why?
Public Sub mnuInvert_Click()
Dim Pixels() As RGBTriplet
Dim X As Integer
Dim Y As Integer
Dim Bits As Integer
GetPixel Picture1, X, Y
For X = 0 To Picture1.ScaleWidth
For Y = 0 To Picture1.ScaleHeight
With Pixels(X, Y)
.rgbRed = 255 - .rgbRed
.rgbGreen = 255 - .rgbGreen
.rgbBlue = 255 - .rgbBlue
End With
Next Y
Next X
SetPixel Picture1, X, Y, Bits
Picture1.Picture = Picture1.Image
End Sub
does anyone know why?