I have Image Like this:
Now, i want to fill the color to the Specific part of that image. as like If i select color blue and if i touch on Cap then the cap should be fill with the color Blue. Same thing should be also happen with the other part like nose, Mouth, Eyes etc
So, How it is possible using android ?
Can any budy help me please.
Updated
I have try with the implementation of the FloodFill algorithm in my app. See Here
But after doing that i got exception like:
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): java.lang.IllegalStateException
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.graphics.Bitmap.setPixel(Bitmap.java:847)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.project.fingerpaint.FinderPaintDemo.FloodFill(FinderPaintDemo.java:284)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.project.fingerpaint.FinderPaintDemo.access$3(FinderPaintDemo.java:272)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.project.fingerpaint.FinderPaintDemo$MyView.onTouchEvent(FinderPaintDemo.java:187)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.View.dispatchTouchEvent(View.java:3766)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.app.Activity.dispatchTouchEvent(Activity.java:2086)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.view.ViewRoot.handleMessage(ViewRoot.java:1785)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.os.Looper.loop(Looper.java:123)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at java.lang.reflect.Method.invokeNative(Native Method)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at java.lang.reflect.Method.invoke(Method.java:521)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-09 17:45:16.260: ERROR/AndroidRuntime(2558): at dalvik.system.NativeStart.main(Native Method)
Now, What wrong in my code ??
Please help me in that condition.
Thanks.