wp_imagecreatetruecolor() WP 2.9.0
Create new GD image resource with transparency support
Хуков нет.
Возвращает
resource/GdImage/false. The GD image resource or GdImage instance on success. False on failure.
Использование
wp_imagecreatetruecolor( $width, $height );
- $width(число) (обязательный)
- Image width in pixels.
- $height(число) (обязательный)
- Image height in pixels.
Список изменений
С версии 2.9.0 | Введена. |
Код wp_imagecreatetruecolor() wp imagecreatetruecolor WP 5.6.2
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;
}