• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image processing  RSS feed

 
Manoj Tare
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to increase and drease brightness , constrast,
blur of image using swing API
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't so easy. First you need to set up your image as a MemoryImageSource so you can access the pixels and the color model. Then you will have to set the max and min pixel value to display in the color model (adjust brightness). Then scale any values between the min and max (adjust contrast), and then create a new IndexColorModel that represents thes changes. Assign the new color model to the BufferedImage, translate to a reqular awt.Image, and you have changed image brightness and contrast. Blur, however, I don't know anything about.
I have some code here for grayscale images stored in bytes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!