mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT #3775 Added getter to GD so you can retrieve the internal GD resource being used. Made setGD public so you can override the GD yourself as well (from r111887)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112937 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3c681b0324
commit
6d423c9f9b
@ -27,12 +27,17 @@ class GD extends Object {
|
||||
$this->quality = self::$default_quality;
|
||||
parent::__construct();
|
||||
}
|
||||
protected function setGD($gd) {
|
||||
|
||||
public function setGD($gd) {
|
||||
$this->gd = $gd;
|
||||
$this->width = imagesx($gd);
|
||||
$this->height = imagesy($gd);
|
||||
}
|
||||
|
||||
|
||||
public function getGD() {
|
||||
return $this->gd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default image quality.
|
||||
* @param quality int A number from 0 to 100, 100 being the best quality.
|
||||
|
Loading…
Reference in New Issue
Block a user