Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
imagecreate() function in PHP
The imagecreate() function is used to create a new image. It is preferred to use imagecreatetruecolor() to create an image instead of imagecreate(). This is because the image processing occurs on the highest quality image possible which can be created using imagecreatetruecolor().
Syntax
imagecreate( $width, $height )
Parameters
width: The width of image
height: The height of image
Return
The imagecreate() function returns an image resource identifier on success or FALSE on errors.
Example
The following is an example:
Output
The following is the output:

Advertisements
