This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
 
Consider Paul's rocket mass heater.
 
subject: changing colors