Results 1 to 3 of 3
Thread: Color Balance
- 09-14-2009, 03:39 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 15
- Rep Power
- 0
Color Balance
I need a subroutine:
it takes the BufferedImage, and adds color balance to the image, and returns it.Java Code:public BufferedImage colorBalance(BufferedImage src, Color r, Color g, Color b)
I am making a lightsaber maker program, pretty much the same as LSMaker (lsmaker.uw.hu), and i need this for the rendering.
The person who solves this will get credited.
I have a preview on YouTube, search for "THEAniKan" and scroll down to it.
I would put a link, but i don't have 25 posts yet...
- 09-14-2009, 03:46 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
I have solved it!! Give me the loot. It's all my mine.
- 09-14-2009, 04:34 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 15
- Rep Power
- 0
So, i got some more done. Now you atleast can have the rgb values for each pixel.
Java Code:public BufferedImage colorBalance(BufferedImage src, byte red, byte green, byte blue) { int width = src.getWidth(); int height = src.getHeight(); for(int i = 0; i < width; i++) { for(int j = 0; j < height; j++) { int rgb = src.getRGB(i,j); int a = (rgb >>> 24) & 0xFF; int r = (rgb >>> 16) & 0xFF; int g = (rgb >>> 8) & 0xFF; int b = (rgb >>> 0) & 0xFF; } } return src; }
Similar Threads
-
Binary Tree Deletion & Balance Methods
By sev51 in forum New To JavaReplies: 1Last Post: 01-27-2009, 04:26 PM -
color texts
By layst in forum New To JavaReplies: 1Last Post: 10-22-2008, 02:47 PM -
Color TabbedPane Example
By Java Tip in forum javax.swingReplies: 0Last Post: 06-26-2008, 07:36 PM -
Color objects
By CyberFrog in forum New To JavaReplies: 4Last Post: 04-01-2008, 12:41 AM -
A bit of color!
By tim in forum Java 2DReplies: 8Last Post: 02-11-2008, 11:57 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks