Don't know right I'm or not, but this is new Utility.ClampToByte() code:
#region UICode
int Amount1 = 0; // [0,255] Transparensy
#endregion
void Render(Surface dst, Surface src, Rectangle rect)
{
PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds);
ColorBgra CurrentPixel;
int R, G, B;
byte A;
for(int y = rect.Top; y < rect.Bottom; y++)
{
for (int x = rect.Left; x < rect.Right; x++)
{
CurrentPixel = src[x,y];
R = (int)CurrentPixel.R;
G = (int)CurrentPixel.G;
B = (int)CurrentPixel.B;
A = (byte)(int)(Amount1 - CurrentPixel.A);
dst[x,y] = ColorBgra.FromBgra(Utility.ClampToByte(,Utility.ClampToByte(G),Utility.ClampToByte(R),Utility.ClampToByte(A));
}
}
}