Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
+7
-2
@@ -218,8 +218,10 @@ class _Gd extends \IPS\Image
|
||||
{
|
||||
case 'gif':
|
||||
imagealphablending( $newImage, FALSE );
|
||||
// PHP8 fix, see https://stackoverflow.com/questions/3874533/what-could-cause-a-color-index-out-of-range-error-for-imagecolorsforindex
|
||||
$transindex = imagecolortransparent( $this->image );
|
||||
if( $transindex >= 0 )
|
||||
$palletsize = imagecolorstotal($this->image);
|
||||
if( $transindex >= 0 AND $transindex < $palletsize )
|
||||
{
|
||||
$transcol = @imagecolorsforindex( $this->image, $transindex );
|
||||
$transindex = imagecolorallocatealpha( $newImage, $transcol['red'], $transcol['green'], $transcol['blue'], 127 );
|
||||
@@ -292,8 +294,11 @@ class _Gd extends \IPS\Image
|
||||
{
|
||||
case 'gif':
|
||||
imagealphablending( $newImage, FALSE );
|
||||
|
||||
// PHP8 fix, see https://stackoverflow.com/questions/3874533/what-could-cause-a-color-index-out-of-range-error-for-imagecolorsforindex
|
||||
$transindex = imagecolortransparent( $this->image );
|
||||
if( $transindex >= 0 )
|
||||
$palletsize = imagecolorstotal($this->image);
|
||||
if( $transindex >= 0 AND $transindex < $palletsize )
|
||||
{
|
||||
$transcol = @imagecolorsforindex( $this->image, $transindex );
|
||||
$transindex = imagecolorallocatealpha( $newImage, $transcol['red'], $transcol['green'], $transcol['blue'], 127 );
|
||||
|
||||
Reference in new issue
Block a user