Results 1 to 3 of 3

Thread: Grey scaling a Icon

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    Kempton Park, Guateng, South Africa
    Posts
    24
    Just a handy tip:

    If you want to grey scal a Icon, get the color of each pixel individually (prefferably with the GetPixel API), get the RGB value that is the highest i.e. if the RGB value of the pixel is "23,60,10" use 60. Then set the remaining two colors equal to the higest color (leaving you with "60,60,60") then write it back to the target image (prefferably with the SetPixel API) and vouala! you have a grey scaled icon! (Just remember to check each pixel agianst the picture box's background color to retain the transparancy)

    Now if I can just figure out how to stop the picture box from throughing away the pixels that has been drawn whenever the picture box redraws

    P.S. The use of the API's are purely for speed reasons.
    "He who laughs at a question is not worth being asked"

    RavenCrow

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Set autoredraw to true.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 1999
    Location
    Kempton Park, Guateng, South Africa
    Posts
    24
    Thanks

    P.S. Setting the autoredraw to true only works after you set {window.refresh}
    "He who laughs at a question is not worth being asked"

    RavenCrow

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width