Quote Originally Posted by User137 View Post
Round() would be bottlenecking that
Code:
Function Gray(vColor:TByte4):TByte4; Var   vAverage: byte; begin   vAverage:=round(vColor.R*0.3+vColor.G*0.59+vColor.B*0.11);   result.R:=vAverage;   result.G:=vAverage;   result.B:=vAverage;   result.A:=vColor.A; end;
The function should work, if you are getting black you are not using it with right parameters and result value. It's not directly compatible with TColor if that is the type.
Thanks, I guess I overlooked that.