original_string: public function display()
      {
          if(isset($this->edited )){
              $image = $this->edited;
          } else {
              $image = $this->original;
          }
  
          if ($this->type == "jpg")
  
      {
              header("Content-type: image/jpeg");
              imagejpeg($image);
  
          } elseif ($this->type == "png") {
  
              header("Content-type: image/png");
              imagepng($image);
  
          } elseif ($this->type == "gif") {
  
              header("Content-type: image/gif");
              imagegif($image);
          }
      }
code: public function display()
      {
          if(isset($this->edited )){
              $image = $this->edited;
          } else {
              $image = $this->original;
          }
  
          if ($this->type == "jpg")
  
      {
              header("Content-type: image/jpeg");
              imagejpeg($image);
  
          } elseif ($this->type == "png") {
  
              header("Content-type: image/png");
              imagepng($image);
  
          } elseif ($this->type == "gif") {
  
              header("Content-type: image/gif");
              imagegif($image);
          }
      }
code_tokens: public function display ( ) { if ( isset ( $ this -> edited ) ) { $ image = $ this -> edited ; } else { $ image = $ this -> original ; } if ( $ this -> type == "jpg" ) { header ( "Content-type: image/jpeg" ) ; imagejpeg ( $ image ) ; } elseif ( $ this -> type == "png" ) { header ( "Content-type: image/png" ) ; imagepng ( $ image ) ; } elseif ( $ this -> type == "gif" ) { header ( "Content-type: image/gif" ) ; imagegif ( $ image ) ; } }
docstring: Displays the edited image to screen as a dynamic image file
docstring_tokens: Displays the edited image to screen as a dynamic image file