wp_imagecreatetruecolor( int $width, int $height )
Create new GD image resource with transparency support
Description Description
Parameters Parameters
- $width
-
(int) (Required) Image width in pixels.
- $height
-
(int) (Required) Image height in pixels..
Return Return
(resource) The GD image resource.
Source Source
File: wp-includes/media.php
function wp_imagecreatetruecolor( $width, $height ) {
$img = imagecreatetruecolor( $width, $height );
if ( is_resource( $img ) && function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
imagealphablending( $img, false );
imagesavealpha( $img, true );
}
return $img;
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |