| | |
converting JPEG colour image into gray scale image??
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2006
Posts: 9
Reputation:
Solved Threads: 1
Last edited by Nilesh Pagar; Mar 5th, 2008 at 8:34 am.
Nilesh Pagar
If you need to make the calculations yourself at the pixel level, you first calculate the luminence from the RGB values
http://en.wikipedia.org/wiki/Graysca...r_to_grayscale
Drawing the image to a new BufferedImage of TYPE_BYTE_GRAY, as mentioned in the previous post, is probably the easiest though.
y = .30*R + .59*G + .11*B and then set the R,G,and B values to that calculated value.http://en.wikipedia.org/wiki/Graysca...r_to_grayscale
Drawing the image to a new BufferedImage of TYPE_BYTE_GRAY, as mentioned in the previous post, is probably the easiest though.
![]() |
Other Threads in the Java Forum
- Previous Thread: cohort class compile errors
- Next Thread: Image Array Issue..... Any ideas???
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array arrays automation binary blackberry block bluetooth character chat class client code compile component consumer database desktop developmenthelp eclipse error fractal freeze ftp game gameprogramming givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaee javaprojects jetbrains jmf jni jpanel julia lego linked linux list loop loops mac map method methods mobile netbeans newbie notdisplaying number online page print printf problem program programming project properties recursion researchinmotion rotatetext rsa scanner screen server set singleton size sms sort sql string swing system template textfields threads time title tree tutorial-sample update windows working






