<slide title="Creating a canvas">
<blurb>
Canvases are created using one of the %imagecreate*% family of functions as %imagecreate()% (to create an empty canvas) or %imagecreatefromjpeg()% (to create from an existing Jpeg image)
Both functions return a resource representing the canvas for that image.
</blurb>
<example fontsize="1.6em"><![CDATA[<?php
	/* Create an new 256 x 256 image canvas */
	$img = imagecreate(256, 256);

	/* Create a canvas based on a jpeg */
	$img2 = imagecreatefromjpeg("/path/to/my/jpeg");
?>]]>
</example>
<blurb title="GD can support the loading of a number of formats:"/>
<list>
        <bullet>%imagecreate($width, $height)% - Creates an empty canvas</bullet>
        <bullet>%imagecreatetruecolor($width, $height)% - Creates an empty 24-bit color canvas</bullet>
        <bullet>%imagecreatefromjpeg($filename)% - Creates a canvas based on a Jpeg image</bullet>
        <bullet>%imagecreatefrompng($filename)% - Creates a canvas based on a PNG image</bullet>
        <bullet>Similar functions for XPM, WBMP, XBM, and GIF files</bullet>
    </list>
</slide>

