wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_imagecreatetruecolor › WordPress Function

Od2.9.0
Przestarzałyn/a
wp_imagecreatetruecolor ( $width, $height )
Parametry: (2)
  • (int) $width Image width in pixels.
    Wymagane: Tak
  • (int) $height Image height in pixels.
    Wymagane: Tak
Powrót:
  • (resource|GdImage|false) The GD image resource or GdImage instance on success. False on failure.
Zdefiniowane na:
Codex:

Creates a new GD image resource with transparency support.



Źródło

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