imagecreatetruecolor

Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Create a new true color image
imagecreatetruecolor(int $widthint $height): GdImage|false
        $size $image->getSize();




        
$resource imagecreatetruecolor($size->width$size->height);




        if (
is_null($matte)) {
    protected function modify($image$dst_x$dst_y$src_x$src_y$dst_w$dst_h$src_w$src_h)

    {


        
$modified imagecreatetruecolor($dst_w$dst_h);




        
$resource $image->getCore();
        $height imagesy($resource);




        
$canvas imagecreatetruecolor($width$height);




        
imagealphablending($canvasfalse);
    public function newImage($width$height$background null)

    {


        
$core imagecreatetruecolor($width$height);

        
$image = new Image(new static, $core);
    {

        
$width imagesx($core);

        
$height imagesy($core);

        
$clone imagecreatetruecolor($width$height);

        
imagealphablending($clonefalse);

        
imagesavealpha($clonetrue);

        
$transparency imagecolorallocatealpha($clone000127);
    public function testGdApplyToImage()

    {

        
$core imagecreatetruecolor(300200);

        
$image Mockery::mock('\Intervention\Image\Image');

        
$image->shouldReceive('getCore')->once()->andReturn($core);

        
$circle = new CircleGd(250);
    public function testGdApplyToImage()

    {

        
$core imagecreatetruecolor(300200);

        
$image Mockery::mock('\Intervention\Image\Image');

        
$image->shouldReceive('getCore')->once()->andReturn($core);

        
$ellipse = new EllipseGd(250150);
    public function testApplyToImage()

    {


        
$core imagecreatetruecolor(300200);

        
$image Mockery::mock('\Intervention\Image\Image');

        
$image->shouldReceive('getCore')->once()->andReturn($core);

        
$line = new LineGd(1015);
        $mask_image->shouldReceive('pickColor')->andReturn([0,0,0,0]);



        
$canvas_image Mockery::mock('Intervention\Image\Image');

        
$canvas_core imagecreatetruecolor(3232);

        
$canvas_image->shouldReceive('getCore')->times(2)->andReturn($canvas_core);

        
$canvas_image->shouldReceive('pixel');
    public function testGd()

    {

        
$mask_core imagecreatetruecolor(3232);

        
$mask Mockery::mock('\Intervention\Image\Image');

        
$mask->shouldReceive('getCore')->once()->andReturn($mask_core);
    public function testGdApplyToImage()

    {

        
$core imagecreatetruecolor(300200);

        
$image Mockery::mock('\Intervention\Image\Image');

        
$image->shouldReceive('getCore')->once()->andReturn($core);

        
$polygon = new PolygonGd([123456]);
    public function testApplyToImage()

    {


        
$core imagecreatetruecolor(300200);

        
$image Mockery::mock('\Intervention\Image\Image');

        
$image->shouldReceive('getCore')->once()->andReturn($core);

        
$rectangle = new RectangleGd(1015100150);