public void addWeighted(double weight, PixelStruct pix) { r += (int)(weight * pix.r); g += (int)(weight * pix.g); b += (int)(weight * pix.b); a += (int)(weight * pix.a); }
public static PixelStruct PixelMax(PixelStruct pa, PixelStruct pb) { return(new PixelStruct { r = Math.Max(pa.r, pb.r), g = Math.Max(pa.g, pb.g), b = Math.Max(pa.b, pb.b), a = Math.Max(pa.a, pb.a) }); }
public static PixelStruct PixelMax(PixelStruct pa, PixelStruct pb) { return new PixelStruct { r = Math.Max(pa.r, pb.r), g = Math.Max(pa.g, pb.g), b = Math.Max(pa.b, pb.b), a = Math.Max(pa.a, pb.a) }; }