Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change color of image

 
Charles Joseph
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am interest to change the color of image in android.
Could anyone help me.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the following classes:
ColorMatrix
ColorFilter
 
Charles Joseph
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you're welcome!
 
vina parmar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone help me.
 
Piyush Patel
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vina parmar wrote:Could anyone help me.

This Example on Android Developers is useful to start with.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic