1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-14 18:04:01 +02:00
This commit is contained in:
Oliver Vogel
2015-04-22 17:55:49 +02:00
parent 1e7b284f5e
commit c10021588b
2 changed files with 4 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ class BackupCommand extends \Intervention\Image\Commands\AbstractCommand
$clone = imagecreatetruecolor($size->width, $size->height); $clone = imagecreatetruecolor($size->width, $size->height);
imagealphablending($clone, false); imagealphablending($clone, false);
imagesavealpha($clone, true); imagesavealpha($clone, true);
$transparency = imagecolorallocatealpha($clone, 0, 0, 0, 127);
imagefill($clone, 0, 0, $transparency);
// copy image to clone
imagecopy($clone, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height); imagecopy($clone, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height);
$image->setBackup($clone, $backupName); $image->setBackup($clone, $backupName);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B