Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_imagecreatetruecolor ›

Desde2.9.0
Obsoleton/a
wp_imagecreatetruecolor ( $width, $height )
Parâmetros: (2)
  • (int) $width Image width in pixels.
    Required: Yes
  • (int) $height Image height in pixels..
    Required: Yes
Retorna:
  • (resource) The GD image resource.
Definido em:
Codex:

Create new GD image resource with transparency support



Fonte

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;
}