|
-
Feb 19th, 2000, 07:23 AM
#1
Thread Starter
Addicted Member
Hello,
I'm developing an Activex control and need to do a PictureBox show a picture in
greyscale.
Is there a Windows API to do that?
Thanks for any help
[email protected]
-
Feb 19th, 2000, 12:51 PM
#2
Addicted Member
This may not totally help you, but here is a function that can greyscale a color.
Function GreyScale(ByVal Colr As Long) As Integer
' Takes a long integer color value and converts it' to an equivalent grayscale value between 0 and 255
Dim R As Long, G As Long, B As Long
' Break up long color value into red, green, blue
R = Colr Mod 256
Colr = Colr \ 256
G = Colr Mod 256
Colr = Colr \ 256
B = Colr Mod 256
' Find equivalent grayscale value, 0 - 255.
GreyScale = 76 * R / 255 + 150 * G / 255 + 28 * B / 255
End Function
NB: Could you send me a copy of the ActiveX when you are finished with it.
------------------
OmarSwan
[email protected]
http://www.omarswan.cjb.net
To God Be The Glory
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|