If you store your jpg in a BufferedImage class instead of an Image class you can easily get the RGB value from each pixel by calling buferedImage.getRGB(x position, y position). It will return an integer with the RGB value. Or you can get the Red, Green & Blue values individually. Take a look at the BufferedImage class in the java.awt.image package.
Regard your first question, I assume you want to clip the image after you have loaded it (otherwise just clip it in photoshop or some other graphics application). When you draw the image just use the setClip method on the Graphics reference. setClip allows you to specify a rectangular (or other) area you wish to clip to. Take a look at the Graphics class in the java.awt package. -Mike sachin shetty wrote: > Hi > i have a jpg file which is actually obtained by converting a pdf file > in to ajpg file .But there is lot of unnecssary white space i,e the unused > space of a pdf page in the jpg which i want to clip of . > can somebody help me > > also please tell me if there is any way to get the rgb value of each and > everey pixal of an Image. > > Thanks in advance > would be waiting for reply > regards > sachin > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA2D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". -- ****************************************** Mike Robinson, Computer Science Department Maharishi University of Management Fairfield, IA 52557 USA Voice: 1-641-472-7000 ext. 4300 Email: [EMAIL PROTECTED] =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
