Hi how could i apply a colorize type effect to a picture box like in Paint Shop Pro (Colours->Colorize) or in photo shop (press Ctrl+U)
Btw i had to repost on this forum cos its been on the other for hours but only 3 ppl have even read it:(
Printable View
Hi how could i apply a colorize type effect to a picture box like in Paint Shop Pro (Colours->Colorize) or in photo shop (press Ctrl+U)
Btw i had to repost on this forum cos its been on the other for hours but only 3 ppl have even read it:(
the most basic way of doing this is by looping through every pixel of the picture, use Point (or the api function GetPixel) and get the color. then you would break the long value down to three bytes: one for the red value, one for the green, and one for blue (if you didn't already know, r, g, and b are the primary colors when it comes to combining light [e.g. pc monitors]). then you would adjust the values to suit your needs. if you wanted to give it a red tint, you would raise the red value. then you would use the rgb function to convert the separate bytes into a long value, then use Pset (or the api function SetPixel) to draw the new pixel.
confusing? perhaps. fundamental? definitely.