• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image Degradation  RSS feed

 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone tell me if this looks like a good way to pull an image and resize from database with minimal degradation. If there is something I could be doing that will increase the quality of output let me know.

 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's just the nature of image scaling that there is going to be some loss of information. java.awt.Image has a method, getScaledImage(), which gives you some control over the quality of the scaling through the third parameter, hints. Unfortunately it does not return a BufferedImage, so it is still necessary to create a BufferedImage instance and paint the image onto its Graphics instance. I don't know if this would give you better or worse results than your current code. Try it both ways and compare the results.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!