This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes changing colors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "changing colors" Watch "changing colors" New topic
Author

changing colors

bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
hello again!
let's say I have a png file and I want to change all the red colors to another color. is it possible? what's the code?
tnx again guys
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
let's say I have a png file and I want to change all the red colors to another color. is it possible? what's the code?

Where are you processing the image? I don't know how to do that in the mobile, but on the server-side you can use Java Advanced Imaging for manipulating the PNG image.
Here's my attempt to code a sample using the JAI API (not compiled, no guarantees of any sort):


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
bab javier
Ranch Hand

Joined: Aug 12, 2003
Posts: 32
hi! thanks for the tip.
i have to change it in the mobile. its part of a game that i'm developing
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing colors
 
Similar Threads
selected not setting with listbox
Colors for Relationships
WA #2 ..... word association
puzzle of the day
changing background color of JFileChooser.-urgent