!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/dokan/script/vendor/intervention/image/src/Intervention/Image/Imagick/Commands/   drwxrwxrwx
Free 13.16 GB of 57.97 GB (22.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     FillCommand.php (3.31 KB)      -rwxrwxrwx
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Intervention\Image\Imagick\Commands;

use 
Intervention\Image\Commands\AbstractCommand;
use 
Intervention\Image\Exception\NotReadableException;
use 
Intervention\Image\Image;
use 
Intervention\Image\Imagick\Color;
use 
Intervention\Image\Imagick\Decoder;

class 
FillCommand extends AbstractCommand
{
    
/**
     * Fills image with color or pattern
     *
     * @param  \Intervention\Image\Image $image
     * @return boolean
     */
    
public function execute($image)
    {
        
$filling $this->argument(0)->value();
        
$x $this->argument(1)->type('digit')->value();
        
$y $this->argument(2)->type('digit')->value();

        
$imagick $image->getCore();

        try {
            
// set image filling
            
$source = new Decoder;
            
$filling $source->init($filling);

        } catch (
NotReadableException $e) {

            
// set solid color filling
            
$filling = new Color($filling);
        }

        
// flood fill if coordinates are set
        
if (is_int($x) && is_int($y)) {

            
// flood fill with texture
            
if ($filling instanceof Image) {

                
// create tile
                
$tile = clone $image->getCore();

                
// mask away color at position
                
$tile->transparentPaintImage($tile->getImagePixelColor($x$y), 00false);

                
// create canvas
                
$canvas = clone $image->getCore();

                
// fill canvas with texture
                
$canvas $canvas->textureImage($filling->getCore());

                
// merge canvas and tile
                
$canvas->compositeImage($tile\Imagick::COMPOSITE_DEFAULT00);

                
// replace image core
                
$image->setCore($canvas);

            
// flood fill with color
            
} elseif ($filling instanceof Color) {

                
// create canvas with filling
                
$canvas = new \Imagick;
                
$canvas->newImage($image->getWidth(), $image->getHeight(), $filling->getPixel(), 'png');

                
// create tile to put on top
                
$tile = clone $image->getCore();

                
// mask away color at pos.
                
$tile->transparentPaintImage($tile->getImagePixelColor($x$y), 00false);

                
// save alpha channel of original image
                
$alpha = clone $image->getCore();

                
// merge original with canvas and tile
                
$image->getCore()->compositeImage($canvas\Imagick::COMPOSITE_DEFAULT00);
                
$image->getCore()->compositeImage($tile\Imagick::COMPOSITE_DEFAULT00);

                
// restore alpha channel of original image
                
$image->getCore()->compositeImage($alpha\Imagick::COMPOSITE_COPYOPACITY00);
            }

        } else {

            if (
$filling instanceof Image) {

                
// fill whole image with texture
                
$image->setCore($image->getCore()->textureImage($filling->getCore()));

            } elseif (
$filling instanceof Color) {

                
// fill whole image with color
                
$draw = new \ImagickDraw();
                
$draw->setFillColor($filling->getPixel());
                
$draw->rectangle(00$image->getWidth(), $image->getHeight());
                
$image->getCore()->drawImage($draw);
            }
        }

        return 
true;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0069 ]--