mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed deprecated GD usage
This commit is contained in:
parent
4cd6d00159
commit
b282c9f8f3
@ -57,8 +57,7 @@ class GDBackend extends Object implements Image_Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function setGD($gd) {
|
public function setGD($gd) {
|
||||||
Deprecation::notice('3.1', 'Use GD::setImageResource instead',
|
Deprecation::notice('3.1', 'Use GD::setImageResource instead');
|
||||||
Deprecation::SCOPE_CLASS);
|
|
||||||
return $this->setImageResource($gd);
|
return $this->setImageResource($gd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,8 +66,7 @@ class GDBackend extends Object implements Image_Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getGD() {
|
public function getGD() {
|
||||||
Deprecation::notice('3.1', 'GD::getImageResource instead',
|
Deprecation::notice('3.1', 'GD::getImageResource instead');
|
||||||
Deprecation::SCOPE_CLASS);
|
|
||||||
return $this->getImageResource();
|
return $this->getImageResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ class GDTest extends SapphireTest {
|
|||||||
$samples = array();
|
$samples = array();
|
||||||
for($y = 0; $y < $vertical; $y++) {
|
for($y = 0; $y < $vertical; $y++) {
|
||||||
for($x = 0; $x < $horizontal; $x++) {
|
for($x = 0; $x < $horizontal; $x++) {
|
||||||
$colour = imagecolorat($gd->getGD(), $x * 5, $y * 5);
|
$colour = imagecolorat($gd->getImageResource(), $x * 5, $y * 5);
|
||||||
$samples[] = ImageColorsforIndex($gd->getGD(), $colour);
|
$samples[] = ImageColorsforIndex($gd->getImageResource(), $colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $samples;
|
return $samples;
|
||||||
|
Loading…
Reference in New Issue
Block a user