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) {
|
||||
Deprecation::notice('3.1', 'Use GD::setImageResource instead',
|
||||
Deprecation::SCOPE_CLASS);
|
||||
Deprecation::notice('3.1', 'Use GD::setImageResource instead');
|
||||
return $this->setImageResource($gd);
|
||||
}
|
||||
|
||||
@ -67,8 +66,7 @@ class GDBackend extends Object implements Image_Backend {
|
||||
}
|
||||
|
||||
public function getGD() {
|
||||
Deprecation::notice('3.1', 'GD::getImageResource instead',
|
||||
Deprecation::SCOPE_CLASS);
|
||||
Deprecation::notice('3.1', 'GD::getImageResource instead');
|
||||
return $this->getImageResource();
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ class GDTest extends SapphireTest {
|
||||
$samples = array();
|
||||
for($y = 0; $y < $vertical; $y++) {
|
||||
for($x = 0; $x < $horizontal; $x++) {
|
||||
$colour = imagecolorat($gd->getGD(), $x * 5, $y * 5);
|
||||
$samples[] = ImageColorsforIndex($gd->getGD(), $colour);
|
||||
$colour = imagecolorat($gd->getImageResource(), $x * 5, $y * 5);
|
||||
$samples[] = ImageColorsforIndex($gd->getImageResource(), $colour);
|
||||
}
|
||||
}
|
||||
return $samples;
|
||||
|
Loading…
Reference in New Issue
Block a user