1. Home
  2. Computing & Technology
  3. PHP / MySQL

Imagecreate () PHP Function

By Angela Bradley, About.com

Definition: The imagecreate () function is used in PHP to create a new palette based image using the GD Library. It's two parameters are width and then height of the image to be created.
Also Known As: Image Create, PHP Image Create
Examples:
<?php header ("Content-type: image/png");
$handle = ImageCreate (130, 50) or die ("Cannot Create image");
$bg_color = ImageColorAllocate ($handle, 255, 0, 0);
ImagePng ($handle);
?>
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Create Image - Imagecreate - Create Image PHP

©2009 About.com, a part of The New York Times Company.

All rights reserved.