GoLang imagecreatetruecolor

request it (384)
GoLang replacement for PHP's imagecreatetruecolor [edit | history]



Do you know a GoLang replacement for PHP's imagecreatetruecolor? Write it!

PHP imagecreatetruecolor

PHP original manual for imagecreatetruecolor [ show | php.net ]

imagecreatetruecolor

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

imagecreatetruecolorCreate a new true color image

Description

resource imagecreatetruecolor ( int $width , int $height )

imagecreatetruecolor() returns an image identifier representing a black image of the specified size.

Parameters

width

Image width.

height

Image height.

Return Values

Returns an image resource identifier on success, FALSE on errors.

Examples

Example #1 Creating a new GD image stream and outputting an image.

<?php
header 
('Content-Type: image/png');
$im = @imagecreatetruecolor(12020)
      or die(
'Cannot Initialize new GD image stream');
$text_color imagecolorallocate($im2331491);
imagestring($im155,  'A Simple Text String'$text_color);
imagepng($im);
imagedestroy($im);
?>

The above example will output something similar to:

Output of example : Creating a new GD image stream and outputting an image.

See Also