Main Menu

A little Rugby

Started by kevin, February 21, 2006, 11:18:16 PM

Previous topic - Next topic

kevin

Quotewow, how's that work?
do you just look at a series of colors on the players shirtsthen create different player images for every colour?


The above builds a new coloured player from two copies of the original player image.


Image #1 is the original  player image

Image #2 is a mask of the player image. (the mask fits over the pixels that are to be coloured)  The Mask is drawn in colour Rgb(0,0,255) in this case and the rest of the image is black rgb(0,0,0).  Image #2 has it's transparent colour set to that of the mask colour.  In this case it'd be ImageMaskColour 2,Rgb(0,0255)


Both images are the same size


Steps,

Image 1 is copied a temp image.

Image #2 is drawn over the Temp image.  Which removes any unwanted pixels, leaving the jersey/socks (what ever you wanna colour) behind.

Convert the temp image to Grey Scale.  

Scan through the Temp image pixel by pixel, and multy each pixels RGB  by the a new colourize RGB value

To rebuild the image, either copy the TEMP back over the Image #1, or copy image #1 to a new image and then draw the coloured temp over that.   Which will leave your original image in tact..