Re: what color that pixel?
Hi,
solutions to get the color could be:
Private Sub Form_Click ()
Dim MidColor ' Color of the form center
MidColor = Point(Width / 2, Height / 2)
end sub
and to set the color use object.PSet:
object.PSet [Step] (x, y), [color]
Hope that fits,
mabrin
Re: what color that pixel?
Say the photo is in Picture1. Then, in its MouseDown event, write
private sub picture1_mousedown(......, X as Single, Y as Single)
dim col as long, newcol as long
dim red as byte, green as byte, blue as byte
'get the pixel value at that point
col=picture1.point(x,y)
'Separate them into Red Green and Blue Components
red=col and &hff
green=(col and &hff00&)/&h100&
blue=(col and &hff0000&)/&h10000&
'Modify the values -- Add a constant to increase the brightness
red=red+10
green=green+10
blue=blue+10
'Use RGB() to determine the new pixel value
newcol=RGB(red, green, blue)
'Write this new pixel with the PSet method
picture1.pset(x,y),newcol
end sub
Re: what color that pixel?
Thanks to all
I'll try these ideas out
Again MANY THANKS
Phil