I want to replace color of an image. For example turn all blue colors to red without any distortion on shape. When i try this i can swap the colors by iterating every pixel,
The usual way to do this is to use an RGBImageFilter. See the docs for FilteredImageSource for how to use such a filter.