Skip to content

Commit

Permalink
ENHANCEMENT #3775 Added getter to GD so you can retrieve the internal…
Browse files Browse the repository at this point in the history
… GD resource being used. Made setGD public so you can override the GD yourself as well

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@111887 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Sean Harvey authored and Sam Minnee committed Feb 2, 2011
1 parent 472344a commit cd05f94
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions filesystem/GD.php
Expand Up @@ -27,12 +27,17 @@ function __construct($filename = null) {
$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.
Expand Down

0 comments on commit cd05f94

Please sign in to comment.