original_string: public function render(): Image {
          $ftbbox = imageftbbox($this->fontSize, 0, $this->fontFile, $this->text, $this->extraInfo);
  
          $width = max($ftbbox[2] - $ftbbox[6], 1);
          $height = max($ftbbox[3] - $ftbbox[7], 1);
  
          // Getting an offset for the first symbol of text
          $ftbbox = imageftbbox($this->fontSize, 0, $this->fontFile, $this->text[0] ?? '', $this->extraInfo);
          $offset = $ftbbox[3] - $ftbbox[7];
  
          $image = Utility::transparentImage($width, $height);
          imagefttext(
              $image->getResource(),
              $this->fontSize,
              0,
              0,
              $offset,
              $this->color->allocate($image->getResource()),
              $this->fontFile,
              $this->text,
              $this->extraInfo
          );
  
          return $image;
      }
code: public function render(): Image {
          $ftbbox = imageftbbox($this->fontSize, 0, $this->fontFile, $this->text, $this->extraInfo);
  
          $width = max($ftbbox[2] - $ftbbox[6], 1);
          $height = max($ftbbox[3] - $ftbbox[7], 1);
  
          // Getting an offset for the first symbol of text
          $ftbbox = imageftbbox($this->fontSize, 0, $this->fontFile, $this->text[0] ?? '', $this->extraInfo);
          $offset = $ftbbox[3] - $ftbbox[7];
  
          $image = Utility::transparentImage($width, $height);
          imagefttext(
              $image->getResource(),
              $this->fontSize,
              0,
              0,
              $offset,
              $this->color->allocate($image->getResource()),
              $this->fontFile,
              $this->text,
              $this->extraInfo
          );
  
          return $image;
      }
code_tokens: public function render ( ) : Image { $ ftbbox = imageftbbox ( $ this -> fontSize , 0 , $ this -> fontFile , $ this -> text , $ this -> extraInfo ) ; $ width = max ( $ ftbbox [ 2 ] - $ ftbbox [ 6 ] , 1 ) ; $ height = max ( $ ftbbox [ 3 ] - $ ftbbox [ 7 ] , 1 ) ; // Getting an offset for the first symbol of text $ ftbbox = imageftbbox ( $ this -> fontSize , 0 , $ this -> fontFile , $ this -> text [ 0 ] ?? '' , $ this -> extraInfo ) ; $ offset = $ ftbbox [ 3 ] - $ ftbbox [ 7 ] ; $ image = Utility :: transparentImage ( $ width , $ height ) ; imagefttext ( $ image -> getResource ( ) , $ this -> fontSize , 0 , 0 , $ offset , $ this -> color -> allocate ( $ image -> getResource ( ) ) , $ this -> fontFile , $ this -> text , $ this -> extraInfo ) ; return $ image ; }
docstring: Renders object as an image.
  
  @return Image Image
docstring_tokens: Renders object as an image .