History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: DOTCMS-3572
Type: Improvement Improvement
Status: Released Released
Resolution: Released
Priority: Major Major
Assignee: Testing User
Reporter: Mart Järvi
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
dotCMS

resized images quality

Created: December 18, 2009 4:43 AM   Updated: March 10, 2010 8:44 AM
Component/s: d3. WM - Files
Affects Version/s: 1.7a
Fix Version/s: 1.9

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0 minutes
Time Spent - 4 hours
Time Spent: 4 hours
Time Spent - 4 hours


 Description  « Hide
right now the Thumbnail.java class resize images with quality 100 which is not very good because files are very large. the default quality should be 85
and user configurable from the configuration files.

code is this and cannot be changed without creating a patch plugin.
int quality = Integer.parseInt("100");
quality = Math.max(0, Math.min(quality, 100));
param.setQuality((float)quality / 100.0f, false);

also the resizeimage method uses g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF) which means that the created thumbnails look very "pixelated".

 All   Comments   Work Log   Change History   Subversion Commits   FishEye      Sort Order: Ascending order - Click to sort in descending order
Jason Tesser - December 18, 2009 5:36 AM
we need to leave what we have as default values but add logic so that if parameters are passed in the values will be set to the parameters value for each option.

David Torres - February 10, 2010 9:33 AM
Armando,

Add parameters to the dotmarketing config properties to configure those options

David Torres - February 22, 2010 4:37 PM
code reviewed and tested

David Torres - February 24, 2010 11:16 AM
I found and fixed some other issues with the resizer servlet