17488 Posts in 4473 Topics by 1978 members
|Go to End|
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)
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 .
23 January 2008 at 3:11am Last edited: 20 June 2008 11:38pm
Thanks for the quick answer. Worked perfectly.
|Go to Top|