File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 2052
    
  22

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
 
Similar Threads
image manipulation
How to send image over a network
ImageIO.read() timeout?
Null check on an image
java.lang.IllegalArgumentException: im == null!