File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: changing colors