MINOR Moved GD::set_default_quality() function to the top of the file to align with conventions (from r111888)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112938 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-19 05:04:14 +00:00
parent 6d423c9f9b
commit aa1d6c72f0

View File

@ -9,7 +9,17 @@ class GD extends Object {
protected $quality;
protected static $default_quality = 75;
/**
* Set the default image quality.
* @param quality int A number from 0 to 100, 100 being the best quality.
*/
static function set_default_quality($quality) {
if(is_numeric($quality) && (int) $quality >= 0 && (int) $quality <= 100) {
self::$default_quality = (int) $quality;
}
}
function __construct($filename = null) {
// If we're working with image resampling, things could take a while. Bump up the time-limit
increase_time_limit_to(300);
@ -38,16 +48,6 @@ class GD extends Object {
return $this->gd;
}
/**
* Set the default image quality.
* @param quality int A number from 0 to 100, 100 being the best quality.
*/
static function set_default_quality($quality) {
if(is_numeric($quality) && (int) $quality >= 0 && (int) $quality <= 100) {
self::$default_quality = (int) $quality;
}
}
/**
* Set the image quality, used when saving JPEGs.
*/