Hi dear all i am new in java i don't know how identify the background and foreground color of image if any have idea please help thanks in advance

Re: How to know background and foreground color of image in java 80 80

You can read the image into an Image object, then use the PixelGrabber class to examine the individual pixels and get their colors, but after that it gets difficult - how exactly would you define "background color" and "foreground color" for some arbitrary image?

Re: How to know background and foreground color of image in java 80 80

You said your new to Java. If thats the case then I would definately recommend not starting out with such an ambitious project.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.