|
@@ 556-561 (lines=6) @@
|
| 553 |
|
|
| 554 |
|
$targetImage = imagecreatetruecolor($targetWidth, $targetHeight); |
| 555 |
|
|
| 556 |
|
if ($this->mime === 'image/png') { |
| 557 |
|
$bg = imagecolorallocatealpha($targetImage, 255, 255, 255, 127); |
| 558 |
|
imagefill($targetImage, 0, 0, $bg); |
| 559 |
|
imagealphablending($targetImage, false); |
| 560 |
|
imagesavealpha($targetImage, true); |
| 561 |
|
} |
| 562 |
|
|
| 563 |
|
$this->fastCopyResampled($targetImage, $this->gdImage, 0, 0, 0, 0, $targetWidth, $targetHeight, |
| 564 |
|
$this->width, $this->height, (int)max(floor($quality / 20), 6)); |
|
@@ 667-672 (lines=6) @@
|
| 664 |
|
{ |
| 665 |
|
$targetImage = imagecreatetruecolor($width, $height); |
| 666 |
|
|
| 667 |
|
if ($this->mime === 'image/png') { |
| 668 |
|
$bg = imagecolorallocatealpha($targetImage, 255, 255, 255, 127); |
| 669 |
|
imagefill($targetImage, 0, 0, $bg); |
| 670 |
|
imagealphablending($targetImage, false); |
| 671 |
|
imagesavealpha($targetImage, true); |
| 672 |
|
} |
| 673 |
|
|
| 674 |
|
imagecopy($targetImage, $this->gdImage, 0, 0, $x, $y, $width, $height); |
| 675 |
|
|