PATH:
home
/
lab2454c
/
crypto.keyreum.com
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Gd
/
Commands
<?php namespace Intervention\Image\Gd\Commands; use Intervention\Image\Commands\AbstractCommand; class InsertCommand extends AbstractCommand { /** * Insert another image into given image * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { $source = $this->argument(0)->required()->value(); $position = $this->argument(1)->type('string')->value(); $x = $this->argument(2)->type('digit')->value(0); $y = $this->argument(3)->type('digit')->value(0); // build watermark $watermark = $image->getDriver()->init($source); // define insertion point $image_size = $image->getSize()->align($position, $x, $y); $watermark_size = $watermark->getSize()->align($position); $target = $image_size->relativePosition($watermark_size); // insert image at position imagealphablending($image->getCore(), true); return imagecopy($image->getCore(), $watermark->getCore(), $target->x, $target->y, 0, 0, $watermark_size->width, $watermark_size->height); } }
[-] InsertCommand.php
[edit]
[-] HeightenCommand.php
[edit]
[-] BlurCommand.php
[edit]
[-] LimitColorsCommand.php
[edit]
[-] ResetCommand.php
[edit]
[-] SharpenCommand.php
[edit]
[-] TrimCommand.php
[edit]
[+]
..
[-] ColorizeCommand.php
[edit]
[-] PixelateCommand.php
[edit]
[-] GammaCommand.php
[edit]
[-] FitCommand.php
[edit]
[-] BrightnessCommand.php
[edit]
[-] InterlaceCommand.php
[edit]
[-] ContrastCommand.php
[edit]
[-] OpacityCommand.php
[edit]
[-] WidenCommand.php
[edit]
[-] InvertCommand.php
[edit]
[-] DestroyCommand.php
[edit]
[-] ResizeCommand.php
[edit]
[-] MaskCommand.php
[edit]
[-] CropCommand.php
[edit]
[-] GetSizeCommand.php
[edit]
[-] GreyscaleCommand.php
[edit]
[-] BackupCommand.php
[edit]
[-] ResizeCanvasCommand.php
[edit]
[-] FillCommand.php
[edit]
[-] FlipCommand.php
[edit]
[-] RotateCommand.php
[edit]
[-] PickColorCommand.php
[edit]
[-] PixelCommand.php
[edit]