Replaces pixels with OldPixel in the given rectangle by NewPixel.
TBaseImage Class
public procedure ReplaceColor(X: LongInt; Y: LongInt; Width: LongInt; Height: LongInt; OldColor: Pointer; NewColor: Pointer);
OldPixel and NewPixel should point to the pixels in the same format as the given image is in.