This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes How to display the best quality of a photo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to display the best quality of a photo" Watch "How to display the best quality of a photo" New topic
Author

How to display the best quality of a photo

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Hi,
With spring 3.0.7, cxf webservices, jsp and mysql 5,
I currently store all image in midiumblob data type in mysql database.
When I retrieve it and display, I found the quality is degraded or not as good as the photo that I have taken using my digital camera.

here is the code I used to display the image. It is written in the controller java class:



ImageUtils.bufferedImageToByteArray() function:



Any suggestion is very appreciated.
Thanks
Sam
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2347
    
  28

You will always have degradation when you scale images. I am not familiar with the Scalr library that you are using to scale the image. You might want to look into the API for Scalr more
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display the best quality of a photo