wp_imagecreatetruecolor()
Creates a 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(int) (обязательный)
- Image width in pixels.
- $height(int) (обязательный)
- Image height in pixels.
Список изменений
С версии 2.9.0 | Введена. |
Код wp_imagecreatetruecolor() wp imagecreatetruecolor WP 6.8
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; }