wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_imagecreatetruecolor › WordPress Function

Depuis2.9.0
Dépréciéen/a
wp_imagecreatetruecolor ( $width, $height )
Paramètres: (2)
  • (int) $width Image width in pixels.
    Requis: Oui
  • (int) $height Image height in pixels.
    Requis: Oui
Retourne:
  • (resource|GdImage|false) The GD image resource or GdImage instance on success. False on failure.
Défini(e) dans:
Codex:

Creates a new GD image resource with transparency support.



Source

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