Currently, I have a good image, which I originally obtain from web.
Since I have 2 different themes for my app. I need a same image, but with different foreground color. I use "bucket fill", to perform color replacement.
However, such technique doesn't handle anti-alias well. In fact, you will get a zig-zag result, when using this simple technique to perform color replacement. This is what it looks like, when I zoom-in to the "eye" region.
The "zig-zag" effect is obvious, when the app is deployed to a low DPI android device.
App's outlook when using original image
App's outlook when using color replaced image (Zig-zag effect seen)
May I know what are some proper ways to perform color replacement?
Don't use the bucket tool. From your original image:
Go to adjustments in the top menu and then curves
Having it set to luminosity will allow you to control the brightness and contrast by dragging the curve about.
Changing to RGB will allow you to control the amount of each colour in the layer.
As you move them you should see your image update and the anti aliasing remain in place.