Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get image width
imagesx(GdImage $image): int
    public function execute($image)

    {

        
$this->setOutput(new Size(

            
imagesx($image->getCore()),

            
imagesy($image->getCore())

        ));
    public function gdResourceToTruecolor(&$resource)

    {

        
$width imagesx($resource);

        
$height imagesy($resource);
    public function cloneCore($core)

    {

        
$width imagesx($core);

        
$height imagesy($core);

        
$clone imagecreatetruecolor($width$height);

        
imagealphablending($clonefalse);