Or you can just take the .Value of the color (Assuming Rb also uses
the optically weighted conversion values, as dda uses -- which I
think it does, iirc.)
John Balestrieri
Tinrocket, LLC
On Mar 30, 2006, at 8:32 PM, dda wrote:
Draw it into a Picture object, and loop over its RGBSurface doing:
c=rs.Pixel(n,j)
k=(C.Red * 0.275) + (C.Green * 0.58) + (C.Blue * 0.145)
rs.Pixel(n,j)=rgb(k,k,k)
you could also just average out the three colours, ie
k=(c.red+c.green+c.blue)\3
but I found that the one above produced better results. My ImageTools
library [plain RB] does that and much more.
HTH
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>