Creates a new GD image resource with transparency support.
Parameters
$width
intrequired- Image width in pixels.
$height
intrequired- Image height in pixels.
Source
* @return resource|GdImage|false The GD image resource or GdImage instance on success.
* False on failure.
*/
function wp_imagecreatetruecolor( $width, $height ) {
$img = imagecreatetruecolor( $width, $height );
if ( is_gd_image( $img )
&& function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' )
) {
imagealphablending( $img, false );
imagesavealpha( $img, true );
}
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.