!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)

/uploads/script/vendor/intervention/image/src/Intervention/Image/Imagick/   drwxr-xr-x
Free 13.11 GB of 57.97 GB (22.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Intervention\Image\Imagick;

use 
Intervention\Image\AbstractFont;
use 
Intervention\Image\Exception\RuntimeException;
use 
Intervention\Image\Image;

class 
Font extends AbstractFont
{
    
/**
     * Draws font to given image at given position
     *
     * @param  Image   $image
     * @param  int     $posx
     * @param  int     $posy
     * @return void
     */
    
public function applyToImage(Image $image$posx 0$posy 0)
    {
        
// build draw object
        
$draw = new \ImagickDraw();
        
$draw->setStrokeAntialias(true);
        
$draw->setTextAntialias(true);

        
// set font file
        
if ($this->hasApplicableFontFile()) {
            
$draw->setFont($this->file);
        } else {
            throw new 
RuntimeException(
                
"Font file must be provided to apply text to image."
            
);
        }

        
// parse text color
        
$color = new Color($this->color);

        
$draw->setFontSize($this->size);
        
$draw->setFillColor($color->getPixel());

        
// align horizontal
        
switch (strtolower($this->align)) {
            case 
'center':
                
$align \Imagick::ALIGN_CENTER;
                break;

            case 
'right':
                
$align \Imagick::ALIGN_RIGHT;
                break;

            default:
                
$align \Imagick::ALIGN_LEFT;
                break;
        }

        
$draw->setTextAlignment($align);

        
// align vertical
        
if (strtolower($this->valign) != 'bottom') {

            
// corrections on y-position
            
switch (strtolower($this->valign)) {
                case 
'center':
                case 
'middle':
                
// calculate box size
                
$dimensions $image->getCore()->queryFontMetrics($draw$this->text);
                
$posy $posy $dimensions['textHeight'] * 0.65 2;
                break;

                case 
'top':
                
// calculate box size
                
$dimensions $image->getCore()->queryFontMetrics($draw$this->textfalse);
                
$posy $posy $dimensions['textHeight'] * 0.65;
                break;
            }
        }

        
// apply to image
        
$image->getCore()->annotateImage($draw$posx$posy$this->angle * (-1), $this->text);
    }
    
    
/**
     * Calculates bounding box of current font setting
     *
     * @return array
     */
    
public function getBoxSize()
    {
        
$box = [];

        
// build draw object
        
$draw = new \ImagickDraw();
        
$draw->setStrokeAntialias(true);
        
$draw->setTextAntialias(true);

        
// set font file
        
if ($this->hasApplicableFontFile()) {
            
$draw->setFont($this->file);
        } else {
            throw new 
RuntimeException(
                
"Font file must be provided to apply text to image."
            
);
        }

        
$draw->setFontSize($this->size);

        
$dimensions = (new \Imagick())->queryFontMetrics($draw$this->text);

        if (
strlen($this->text) == 0) {
            
// no text -> no boxsize
            
$box['width'] = 0;
            
$box['height'] = 0;
        } else {
            
// get boxsize
            
$box['width'] = intval(abs($dimensions['textWidth']));
            
$box['height'] = intval(abs($dimensions['textHeight']));
        }

        return 
$box;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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