Hi Everyone! I have a grayscale image and need to generate a histogram for this image. I have tried to do so using java jai but nothing seems to work out. Not sure whether it can be done using Java 2D. I am really new at this and hope someone can help me out!

Thanks! :)