Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » Auto-resized images - quality?
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: Auto-resized images - quality? | 1166 Views |
-
Auto-resized images - quality?

23 January 2008 at 12:27am Last edited: 23 January 2008 12:28am
When using the .SetWidth() function on images from a template, is there any way to control the resampling quality? It seems to me that the resampled image is kind of blurred.
Here's an example: http://gvac2.web.pin.se/troll-c/
(click the image to see the original version of the image)
regards,
/Jens
-
Re: Auto-resized images - quality?

23 January 2008 at 12:57am
There are two ways of fixing this that I know of at the moment:
1) Edit sapphire/filesystem/GD.php and change the default quality from 75 to something higher (I find 90 works well). This will change the default quality for _all_ processed images. Of course this will get changed back when you upgrade SS.
2) Extend or decorate the Image class and use the setQuality method to change the quality of generated images. If you're inserting images into the content area of a page then you will need to decorate the Image class, while if you doing a relationship then can just extend it.
It would be much nicer to have an easier way of setting the quality though, even if it was just a constant in _config.php, as this is the most common complaint we have received from our customers.
Of course there may already be an easy way of doing this, but if there is then it's certainly well hidden
. -
Re: Auto-resized images - quality?

23 January 2008 at 3:11am Last edited: 20 June 2008 11:38pm
Thanks for the quick answer. Worked perfectly.
| 1166 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: Cristian, Achilles Interactive
Welcome to our latest member: J2-Paul


