home
/
zktecojo
/
public_html
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Gd
/
Commands
➕ New
📤 Upload
✎ Editing:
BackupCommand.php
← Back
<?php namespace Intervention\Image\Gd\Commands; class BackupCommand extends \Intervention\Image\Commands\AbstractCommand { /** * Saves a backups of current state of image core * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { $backupName = $this->argument(0)->value(); // clone current image resource $size = $image->getSize(); $clone = imagecreatetruecolor($size->width, $size->height); imagealphablending($clone, false); imagesavealpha($clone, true); imagecopy($clone, $image->getCore(), 0, 0, 0, 0, $size->width, $size->height); $image->setBackup($clone, $backupName); return true; } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel