wp_load_image [ WordPress Function ]
wp_load_image ( $file )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_save_image, wp_crop_image, wp_preload_dialogs, media_upload_image, wp_stream_image
Load an image from a string, if PHP supports it.
Source
<?php
function wp_load_image( $file ) {
if ( is_numeric( $file ) )
$file = get_attached_file( $file );
if ( ! file_exists( $file ) )
return sprintf(__('File “%s” doesn’t exist?'), $file);
if ( ! function_exists('imagecreatefromstring') )
return __('The GD image library is not installed.');
// Set artificially high because GD uses uncompressed images in memory
@ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
$image = imagecreatefromstring( file_get_contents( $file ) );
if ( !is_resource( $image ) )
return sprintf(__('File “%s” is not an image.'), $file);
return $image;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_load_image (WordPress Function) - WPSeek.com
WordPress lookup for wp_load_image, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - 3.0 Fatal error: Cannot redeclare wp_load_image() - WordPress
Here's the message: Fatal error: Cannot redeclare wp_load_image() (previously declared in /homepages/38/d262327624/htdocs/wp-includes/media.php:241) in ...
wordpress.org - BUG - wp_load_image and year/month image folders - WordPress
Hi,. I've set up automatic CSS sprite generation on image upload for a particular custom image size. This has been working fine. However, I've run into this odd ...
wordpress.org - Function Reference: wp_load_image() - yukei.net
Function and Method Cross Reference. wp_load_image(). Defined at: /wp- includes/media.php -> line 238. Referenced 2 times: /wp-admin/includes/image. php ...
lab.yukei.net