X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4feeb71a9d812a9ae371c28a3d8b442a4394ded7..607b7e02d77e7326161e8ec15639052d2040f745:/wp-includes/class-wp-image-editor-gd.php diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php index 2093c6b4..d7823ebb 100644 --- a/wp-includes/class-wp-image-editor-gd.php +++ b/wp-includes/class-wp-image-editor-gd.php @@ -96,16 +96,8 @@ class WP_Image_Editor_GD extends WP_Image_Editor { if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) ) return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file ); - /** - * Filter the memory limit allocated for image manipulation. - * - * @since 3.5.0 - * - * @param int|string $limit Maximum memory limit to allocate for images. Default WP_MAX_MEMORY_LIMIT. - * Accepts an integer (bytes), or a shorthand string notation, such as '256M'. - */ - // Set artificially high because GD uses uncompressed images in memory - @ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) ); + // Set artificially high because GD uses uncompressed images in memory. + wp_raise_memory_limit( 'image' ); $this->image = @imagecreatefromstring( file_get_contents( $this->file ) ); @@ -429,7 +421,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor { @ chmod( $filename, $perms ); /** - * Filter the name of the saved image file. + * Filters the name of the saved image file. * * @since 2.6.0 *