original_string: public function resize_image($width, $height) {
          global $CFG;
          require_once($CFG->libdir . '/gdlib.php');
  
          $content = $this->get_content();
  
          // Fetch the image information for this image.
          $imageinfo = @getimagesizefromstring($content);
          if (empty($imageinfo)) {
              return false;
          }
  
          // Create a new image from the file.
          $original = @imagecreatefromstring($content);
  
          // Generate the resized image.
          return resize_image_from_image($original, $imageinfo, $width, $height);
      }
code: public function resize_image($width, $height) {
          global $CFG;
          require_once($CFG->libdir . '/gdlib.php');
  
          $content = $this->get_content();
  
          // Fetch the image information for this image.
          $imageinfo = @getimagesizefromstring($content);
          if (empty($imageinfo)) {
              return false;
          }
  
          // Create a new image from the file.
          $original = @imagecreatefromstring($content);
  
          // Generate the resized image.
          return resize_image_from_image($original, $imageinfo, $width, $height);
      }
code_tokens: public function resize_image ( $ width , $ height ) { global $ CFG ; require_once ( $ CFG -> libdir . '/gdlib.php' ) ; $ content = $ this -> get_content ( ) ; // Fetch the image information for this image. $ imageinfo = @ getimagesizefromstring ( $ content ) ; if ( empty ( $ imageinfo ) ) { return false ; } // Create a new image from the file. $ original = @ imagecreatefromstring ( $ content ) ; // Generate the resized image. return resize_image_from_image ( $ original , $ imageinfo , $ width , $ height ) ; }
docstring: Generate a resized image for this stored_file.
  
  @param int|null $width The desired width, or null to only use the height.
  @param int|null $height The desired height, or null to only use the width.
  @return string|false False when a problem occurs, else the image data.
docstring_tokens: Generate a resized image for this stored_file .