WordPress Version: 6.3
/**
* Creates a new GD image resource with transparency support.
*
* @todo Deprecate if possible.
*
* @since 2.9.0
*
* @param int $width Image width in pixels.
* @param int $height Image height in pixels.
* @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);
}
return $img;
}