This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to get pixel value of each pixel of a gray-scale or black-white image? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to get pixel value of each pixel of a gray-scale or black-white image?" Watch "how to get pixel value of each pixel of a gray-scale or black-white image?" New topic
Author

how to get pixel value of each pixel of a gray-scale or black-white image?

ashish donvir
Greenhorn

Joined: Mar 01, 2012
Posts: 25
can any one suggest me the method to get actual pixel value of each pixel of a gray scale image?

i used this code to get pixel. But it just gives me red value of an pixel? I don't know that black-white or Gray Scale image contains RGB pixels or not, So please tell me that, the method i used is right or wrong? And also when i plotted histogram for my image it was exactly opposite to the imajeJ histogram for same image. So i guess my method to grab pixel of Gray Scale image is somewhere wrong

So If it is wrong what is the right way to get pixel.
here is my code

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

http://www.coderanch.com/t/258773/Applets/java/getting-color-particular-pixel-image#1201744


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get pixel value of each pixel of a gray-scale or black-white image?
 
Similar Threads
Java Advanced Imaging
Drawing Canvas
How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar
Logical operation on Image
Need Faster way to get RGB value for each Pixel of a Buffered Image