| Author |
Creating an IndexColorModel with 8 Colours
|
Mikpo Siru
Ranch Hand
Joined: Apr 09, 2009
Posts: 54
|
|
Hi,
I want to make an IndexColorModel object with 8 colours: red, green, blue, cyan, magenta, yellow, white, black.
I think the constructor below is the one that I need, but I don't know how to continue. Any help is appreciated.
Thanks.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
I take it that this is in continuation of http://www.coderanch.com/t/504019/GUI/java/Suggestions-colour-convertor-program and in response to my suggestion there.
Since you apparently didn't feel the need to acknowledge that the suggestion could be useful to you, I don't feel like guiding you further.
To the Bartenders: If you feel this is unduly harsh and violates the principles of BeNice, please feel free to remove it.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Mikpo Siru
Ranch Hand
Joined: Apr 09, 2009
Posts: 54
|
|
Hi,
I have updated the above mentioned thread.
The documentation gives these parameter descriptions:
The images that I want to represent using IndexColorModel will be user-selected, so the image dimensions are not fixed. If it makes things much simpler, I can restrict the user to selecting an image of a fixed format, such as only GIF or only JPEG.
The eight colours I want the IndexColorModel to have are: red, green, blue, cyan, magenta, yellow, white, black.
Could anyone please explain what the parameters mean in this case? Then I can try filling them in.
Thanks.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4163
|
|
Snippets from the code I used for proof of concept:
|
 |
Mikpo Siru
Ranch Hand
Joined: Apr 09, 2009
Posts: 54
|
|
|
Thanks! This was the main component in the converter program I was writing, so I have updated that thread: http://www.coderanch.com/t/504019/GUI/java/Suggestions-colour-convertor-program#2277917
|
 |
 |
|
|
subject: Creating an IndexColorModel with 8 Colours
|
|
|