webshell
Ghost Exploiter Team Official
Mass Deface
Directory >>
/
home
/
whitjouh
/
public_html
/
core
/
vendor
/
intervention
/
image
/
src
/
Intervention
/
Image
/
Imagick
/
Commands
/
Mass Deface Auto Detect Domain
/*Ubah Ke document_root untuk mass deface*/
File / Folder
Size
Action
.
-
+New File
BackupCommand.php
0.54KB
edt
ren
BlurCommand.php
0.457KB
edt
ren
BrightnessCommand.php
0.472KB
edt
ren
ColorizeCommand.php
1.307KB
edt
ren
ContrastCommand.php
0.482KB
edt
ren
CropCommand.php
1.329KB
edt
ren
DestroyCommand.php
0.546KB
edt
ren
ExifCommand.php
1.492KB
edt
ren
FillCommand.php
3.31KB
edt
ren
FitCommand.php
1.212KB
edt
ren
FlipCommand.php
0.613KB
edt
ren
GammaCommand.php
0.462KB
edt
ren
GetSizeCommand.php
0.575KB
edt
ren
GreyscaleCommand.php
0.397KB
edt
ren
HeightenCommand.php
0.787KB
edt
ren
InsertCommand.php
1.038KB
edt
ren
InterlaceCommand.php
0.603KB
edt
ren
InvertCommand.php
0.374KB
edt
ren
LimitColorsCommand.php
1.751KB
edt
ren
MaskCommand.php
1.893KB
edt
ren
OpacityCommand.php
0.599KB
edt
ren
PickColorCommand.php
0.779KB
edt
ren
PixelCommand.php
0.8KB
edt
ren
PixelateCommand.php
0.655KB
edt
ren
ResetCommand.php
0.897KB
edt
ren
ResizeCanvasCommand.php
3.099KB
edt
ren
ResizeCommand.php
0.703KB
edt
ren
RotateCommand.php
0.753KB
edt
ren
SharpenCommand.php
0.45KB
edt
ren
TrimCommand.php
3.583KB
edt
ren
WidenCommand.php
0.781KB
edt
ren
<?php namespace Intervention\Image\Imagick\Commands; use Intervention\Image\Commands\AbstractCommand; use Intervention\Image\Imagick\Color; class TrimCommand extends AbstractCommand { /** * Trims away parts of an image * * @param \Intervention\Image\Image $image * @return boolean */ public function execute($image) { $base = $this->argument(0)->type('string')->value(); $away = $this->argument(1)->value(); $tolerance = $this->argument(2)->type('numeric')->value(0); $feather = $this->argument(3)->type('numeric')->value(0); $width = $image->getWidth(); $height = $image->getHeight(); $checkTransparency = false; // define borders to trim away if (is_null($away)) { $away = ['top', 'right', 'bottom', 'left']; } elseif (is_string($away)) { $away = [$away]; } // lower border names foreach ($away as $key => $value) { $away[$key] = strtolower($value); } // define base color position switch (strtolower($base)) { case 'transparent': case 'trans': $checkTransparency = true; $base_x = 0; $base_y = 0; break; case 'bottom-right': case 'right-bottom': $base_x = $width - 1; $base_y = $height - 1; break; default: case 'top-left': case 'left-top': $base_x = 0; $base_y = 0; break; } // pick base color if ($checkTransparency) { $base_color = new Color; // color will only be used to compare alpha channel } else { $base_color = $image->pickColor($base_x, $base_y, 'object'); } // trim on clone to get only coordinates $trimed = clone $image->getCore(); // add border to trim specific color $trimed->borderImage($base_color->getPixel(), 1, 1); // trim image $trimed->trimImage(65850 / 100 * $tolerance); // get coordinates of trim $imagePage = $trimed->getImagePage(); list($crop_x, $crop_y) = [$imagePage['x']-1, $imagePage['y']-1]; // $trimed->setImagePage(0, 0, 0, 0); list($crop_width, $crop_height) = [$trimed->width, $trimed->height]; // adjust settings if right should not be trimed if ( ! in_array('right', $away)) { $crop_width = $crop_width + ($width - ($width - $crop_x)); } // adjust settings if bottom should not be trimed if ( ! in_array('bottom', $away)) { $crop_height = $crop_height + ($height - ($height - $crop_y)); } // adjust settings if left should not be trimed if ( ! in_array('left', $away)) { $crop_width = $crop_width + $crop_x; $crop_x = 0; } // adjust settings if top should not be trimed if ( ! in_array('top', $away)) { $crop_height = $crop_height + $crop_y; $crop_y = 0; } // add feather $crop_width = min($width, ($crop_width + $feather * 2)); $crop_height = min($height, ($crop_height + $feather * 2)); $crop_x = max(0, ($crop_x - $feather)); $crop_y = max(0, ($crop_y - $feather)); // finally crop based on page $image->getCore()->cropImage($crop_width, $crop_height, $crop_x, $crop_y); $image->getCore()->setImagePage(0,0,0,0); $trimed->destroy(); return true; } }
<=Back
Liking