my dog learned polymorphism*
The moose likes Android and the fly likes Change color of image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Change color of image" Watch "Change color of image" New topic
Author

Change color of image

Charles Joseph
Greenhorn

Joined: Aug 19, 2009
Posts: 6
Hi all,

I am interest to change the color of image in android.
Could anyone help me.
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Take a look at the following classes:
ColorMatrix
ColorFilter


[List of FAQs] | [Android FAQ] | [Samuh Varta]
Charles Joseph
Greenhorn

Joined: Aug 19, 2009
Posts: 6
I tried lot but my intent is not solved.

Actually i want to change drawable area to color. Say for example, an image have circle, i want to color within the circle, but using ColorMatrix i change full image to specified color (eg red, blue, ..), or i colored circle only.

In ColorMatrix
[ 1 0 0 0 0 - red vector
0 1 0 0 0 - green vector
0 0 1 0 0 - blue vector
0 0 0 1 0 ] - alpha vector
is the important thing.

quiet interesting.

but i don't know how to solve this.

Kindly guide me.




Charles Joseph
Greenhorn

Joined: Aug 19, 2009
Posts: 6
Finally i got the answer. Yes we can use ColorMatrix and extreme ColorFilter to change color of the image.

Thanks to Monu Tripathi
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

you're welcome!
vina parmar
Greenhorn

Joined: Nov 09, 2009
Posts: 22
Hi,

I have a image which has 2 circle intersect each other.
I want to change the color of intersect area on tap.
Color will be changed only of the tapped area.

How can I find the the closed area of image so I can change the color of selected area of image?
Is it possible?

Thanks.
vina parmar
Greenhorn

Joined: Nov 09, 2009
Posts: 22
Monu Tripathi wrote:Take a look at the following classes:
ColorMatrix
ColorFilter



Its really useful.
But, I am not able to solve my problem.

vina parmar
Greenhorn

Joined: Nov 09, 2009
Posts: 22
Could anyone help me.
Piyush Patel
Ranch Hand

Joined: Feb 24, 2009
Posts: 127

vina parmar wrote:Could anyone help me.

This Example on Android Developers is useful to start with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Change color of image