<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- Generated with PHPDoc, http://www.phpdoc.de --> <html> <head> <title>PHP Imlib2 Classes - Imlib - Class: ImlibImage</title> <link href="phpdoc.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" border="0"> <tr> <td align="left" valign="top" bgcolor="#B0BAFF"> <table width="100%"> <tr> <td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td> <td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td> <td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td> <td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td> <td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td> <td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td> </tr> </table> </td> </tr> <tr> <td height="20" align="left" valign="top"><hr></td> </tr> <tr> <td align="left" valign="top"> File: <a href="file:///home/matt/src/cvs/imlib/docs/class.ImlibImage.php" target="_new">/home/matt/src/cvs/imlib/docs/class.ImlibImage.php</a> <h5>PHP Imlib2 Classes - Imlib</h5> <h1>ImlibImage</h1> ImlibImage<br> <p> Handles image loading and saving, parameters, manipulation, and rendering. <p> </td> </tr> <tr> <td align="left" valign="top"> <h4>public class ImlibImage </h4> Handles image loading and saving, parameters, manipulation, and rendering. <br> This class contains methods for the loading and saving of image files. Alsocontained in this class are functions for getting and setting image parameters,image modification, and rendering. <p> <table> <tr><td align="left" valign="top">Authors</td><td align="left" valign="top">Matt McClanahan <<a href="mailto:cardinal@dodds.net">cardinal@dodds.net</a>></td></tr> <tr><td align="left" valign="top">Version</td><td align="left" valign="top">0.3</td></tr> </table> </td> </tr> <tr> <td height="10" align="left" valign="top"> </td> </tr> <tr> <td height="20" align="left" valign="top"><hr></td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Public Method Summary</h2></td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_ImlibImage()"><h4>ImlibImage()</h4></a>ImlibImage constructor</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_blend_onto_image()"><h4>blend_onto_image(int $dst, bool $alpha, int $sx, int $sy, int $sw, int $sh, int $dx, int $dy, int $dw, int $dh, bool $dither, bool $blend, bool $alias)</h4></a>Blend a region of the current image onto the region of another ImlibImage</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_blur()"><h4>blur(int $r)</h4></a>Blur an image with a given blur radius</td> </tr> <tr> <td align="right" valign="top">object ImlibImage</td> <td align="left" valign="top" width="100%"><a href="#function_create_clone()"><h4>create_clone()</h4></a>Create a clone of the current instance, return a new ImlibImage</td> </tr> <tr> <td align="right" valign="top">object ImlibImage</td> <td align="left" valign="top" width="100%"><a href="#function_create_cropped()"><h4>create_cropped(int $sx, int $sy, int $sw, int $sh)</h4></a>Create a cropped ImlibImage from a region of the current instance, return a new ImlibImage</td> </tr> <tr> <td align="right" valign="top">object ImlibImage</td> <td align="left" valign="top" width="100%"><a href="#function_create_cropped_scaled()"><h4>create_cropped_scaled(int $sx, int $sy, int $sw, int $sh, int $dw, int $dh)</h4></a>Create a cropped, scaled ImlibImage from a region of the current instance, return a new ImlibImage</td> </tr> <tr> <td align="right" valign="top">int</td> <td align="left" valign="top" width="100%"><a href="#function_create()"><h4>create(int $width, int $height)</h4></a>Create an image resource to use with this instance</td> </tr> <tr> <td align="right" valign="top">object ImlibImage</td> <td align="left" valign="top" width="100%"><a href="#function_create_rotated()"><h4>create_rotated(float $degrees, [ float $radians ])</h4></a>Create a rotated ImlibImage, return a new ImlibImage</td> </tr> <tr> <td align="right" valign="top">object ImlibImage</td> <td align="left" valign="top" width="100%"><a href="#function_create_scaled()"><h4>create_scaled(integer $width, [ integer $height ])</h4></a>Create a scaled ImlibImage, return a new ImlibImage</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_dump()"><h4>dump([ integer $quality ])</h4></a>Output the raw image data of the current instance to stdout</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_flip_diagonal()"><h4>flip_diagonal()</h4></a>Flip the current image diagonally</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_flip_horizontal()"><h4>flip_horizontal()</h4></a>Flip the current image horizontally</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_flip_vertical()"><h4>flip_vertical()</h4></a>Flip the current image vertically</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_free()"><h4>free()</h4></a>Free the current instance and image resource</td> </tr> <tr> <td align="right" valign="top">mixed</td> <td align="left" valign="top" width="100%"><a href="#function_get_filename()"><h4>get_filename()</h4></a>Get the current filename, if it's set</td> </tr> <tr> <td align="right" valign="top">string</td> <td align="left" valign="top" width="100%"><a href="#function_get_format()"><h4>get_format()</h4></a>Get the current image format. The default is png.</td> </tr> <tr> <td align="right" valign="top">integer</td> <td align="left" valign="top" width="100%"><a href="#function_get_height()"><h4>get_height()</h4></a>Get the current image's height</td> </tr> <tr> <td align="right" valign="top">integer</td> <td align="left" valign="top" width="100%"><a href="#function_get_id()"><h4>get_id()</h4></a>Get the current image's resource id#</td> </tr> <tr> <td align="right" valign="top">integer</td> <td align="left" valign="top" width="100%"><a href="#function_get_width()"><h4>get_width()</h4></a>Get the current image's width</td> </tr> <tr> <td align="right" valign="top">boolean</td> <td align="left" valign="top" width="100%"><a href="#function_has_alpha()"><h4>has_alpha()</h4></a>Check if the image has an alpha channel</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_modify_alpha()"><h4>modify_alpha(int $alpha)</h4></a>Set the alpha channel of an image</td> </tr> <tr> <td align="right" valign="top">integer</td> <td align="left" valign="top" width="100%"><a href="#function_load()"><h4>load(string $infile, [ integer $err ])</h4></a>Load an image file into the current instance</td> </tr> <tr> <td align="right" valign="top">bool</td> <td align="left" valign="top" width="100%"><a href="#function_save()"><h4>save(string $outfile, [ integer $quality ])</h4></a>Save the current instance to a file</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_set_format()"><h4>set_format(string $format)</h4></a>Set the image format for the current instance</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_sharpen()"><h4>sharpen(int $r)</h4></a>Sharpen an image with a given sharpen radius</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_tile()"><h4>tile()</h4></a>Seamlessly tile the current image both horizontally and vertically</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_tile_horizontal()"><h4>tile_horizontal()</h4></a>Seamlessly tile the current image horizontally</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function_tile_vertical()"><h4>tile_vertical()</h4></a>Seamlessly tile the current image vertically</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Private Method Summary</h2></td> </tr> <tr> <td align="right" valign="top">mixed</td> <td align="left" valign="top" width="100%"><a href="#function__get_cb()"><h4>_get_cb(string $cb)</h4></a>Callback for functions which query the current instance's attributes</td> </tr> <tr> <td align="right" valign="top">void</td> <td align="left" valign="top" width="100%"><a href="#function__no_param_cb()"><h4>_no_param_cb(string $cb)</h4></a>Callback for functions which flip or tile the current instance</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Private Field Summary</h2></td> </tr> <tr> <td align="right" valign="top">integer</td> <td align="left" valign="top" width="100%"><a href="#variable_$id"><h4>$id</h4></a>The image resource id#</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Public Method Details</h2></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_ImlibImage()"><h4>ImlibImage</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void ImlibImage( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> ImlibImage constructor <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_blend_onto_image()"><h4>blend_onto_image</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void blend_onto_image( int $dst, bool $alpha, int $sx, int $sy, int $sw, int $sh, int $dx, int $dy, int $dw, int $dh, bool $dither, bool $blend, bool $alias )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Blend a region of the current image onto the region of another ImlibImage <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dst</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">id# of the destination image</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">bool</td> <td align="left" valign="top">$alpha</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">alpha</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sx</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left source X coordinate</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sy</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left source Y coordinate</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sw</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">width</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sh</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">height</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dx</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left destination X coordinate</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dy</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left destination Y coordinate</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dw</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">width</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dh</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">height</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">bool</td> <td align="left" valign="top">$dither</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top"></td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">bool</td> <td align="left" valign="top">$blend</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top"></td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">bool</td> <td align="left" valign="top">$alias</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top"></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_blur()"><h4>blur</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void blur( int $r )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Blur an image with a given blur radius <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$r</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">radius</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create_clone()"><h4>create_clone</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public object ImlibImage create_clone( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create a clone of the current instance, return a new ImlibImage <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>object ImlibImage <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create_cropped()"><h4>create_cropped</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public object ImlibImage create_cropped( int $sx, int $sy, int $sw, int $sh )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create a cropped ImlibImage from a region of the current instance, return a new ImlibImage <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sx</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left X coordinate to crop from</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sy</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left Y coordinate to crop from</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sw</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to crop</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sh</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to crop</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>object ImlibImage <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create_cropped_scaled()"><h4>create_cropped_scaled</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public object ImlibImage create_cropped_scaled( int $sx, int $sy, int $sw, int $sh, int $dw, int $dh )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create a cropped, scaled ImlibImage from a region of the current instance, return a new ImlibImage <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sx</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left X coordinate to crop from</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sy</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">left Y coordinate to crop from</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sw</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to crop</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$sh</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to crop</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dw</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to scale the cropped region to</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$dh</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to scale the cropped region to</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>object ImlibImage <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create()"><h4>create</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public int create( int $width, int $height )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create an image resource to use with this instance <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$width</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">of the image</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$height</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">of the image</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>int <p>Resource id# that was created</td> </tr> <tr> <td align="left" valign="top">See Also</td> <td align="left" valign="top"><a href="#function_get_id()">get_id()</a>, <a href="#var_$id">$id</a></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create_rotated()"><h4>create_rotated</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public object ImlibImage create_rotated( float $degrees, [ float $radians ] )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create a rotated ImlibImage, return a new ImlibImage <br> If radians is specified, degrees will be ignored. <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">float</td> <td align="left" valign="top">$degrees</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to rotate the image</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">float</td> <td align="left" valign="top">$radians</td> <td align="left" valign="top"><code>= >>0<<</code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to rotate the image</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>object ImlibImage <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_create_scaled()"><h4>create_scaled</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public object ImlibImage create_scaled( integer $width, [ integer $height ] )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Create a scaled ImlibImage, return a new ImlibImage <br> If $height is not specified, it will be calculated from the dimensionsof the current image, so that the aspect ratio is preserved. <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">integer</td> <td align="left" valign="top">$width</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to scale the new image to</td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">integer</td> <td align="left" valign="top">$height</td> <td align="left" valign="top"><code>= >>0<<</code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">to scale the new image to (Optional)</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>object ImlibImage <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_dump()"><h4>dump</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void dump( [ integer $quality ] )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Output the raw image data of the current instance to stdout <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">integer</td> <td align="left" valign="top">$quality</td> <td align="left" valign="top"><code>= >>75<<</code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">or compression level to use</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_flip_diagonal()"><h4>flip_diagonal</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void flip_diagonal( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Flip the current image diagonally <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_flip_horizontal()"><h4>flip_horizontal</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void flip_horizontal( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Flip the current image horizontally <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_flip_vertical()"><h4>flip_vertical</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void flip_vertical( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Flip the current image vertically <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_free()"><h4>free</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void free( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Free the current instance and image resource <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_get_filename()"><h4>get_filename</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public mixed get_filename( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Get the current filename, if it's set <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>mixed <p>Filename string or false.</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_get_format()"><h4>get_format</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public string get_format( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Get the current image format. The default is png. <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>string <p>Image format</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_get_height()"><h4>get_height</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public integer get_height( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Get the current image's height <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>integer <p>Image height</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_get_id()"><h4>get_id</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public integer get_id( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Get the current image's resource id# <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>integer <p>Current resource id#</td> </tr> <tr> <td align="left" valign="top">See Also</td> <td align="left" valign="top"><a href="#var_$id">$id</a>, <a href="#function_create()">create()</a></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_get_width()"><h4>get_width</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public integer get_width( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Get the current image's width <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>integer <p>Image width</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_has_alpha()"><h4>has_alpha</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public boolean has_alpha( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Check if the image has an alpha channel <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>boolean <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_modify_alpha()"><h4>modify_alpha</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void modify_alpha( int $alpha )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Set the alpha channel of an image <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$alpha</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">alpha level to set for the image</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_load()"><h4>load</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public integer load( string $infile, [ integer $err ] )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Load an image file into the current instance <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">string</td> <td align="left" valign="top">$infile</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top"></td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">integer</td> <td align="left" valign="top">$err</td> <td align="left" valign="top"><code>= >>0<<</code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">error number. 0 for no error.</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>integer <p>Resource id# or false if load failed</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_save()"><h4>save</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public bool save( string $outfile, [ integer $quality ] )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Save the current instance to a file <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">string</td> <td align="left" valign="top">$outfile</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top"></td> </tr> </table> </td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">integer</td> <td align="left" valign="top">$quality</td> <td align="left" valign="top"><code>= >>75<<</code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">or compression level to use</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>bool <p>False if the save failed</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_set_format()"><h4>set_format</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void set_format( string $format )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Set the image format for the current instance <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">string</td> <td align="left" valign="top">$format</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">format</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_sharpen()"><h4>sharpen</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void sharpen( int $r )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Sharpen an image with a given sharpen radius <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">int</td> <td align="left" valign="top">$r</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">radius</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_tile()"><h4>tile</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void tile( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Seamlessly tile the current image both horizontally and vertically <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_tile_horizontal()"><h4>tile_horizontal</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void tile_horizontal( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Seamlessly tile the current image horizontally <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function_tile_vertical()"><h4>tile_vertical</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>public void tile_vertical( )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Seamlessly tile the current image vertically <br> <p> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> </table> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Private Method Details</h2></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function__get_cb()"><h4>_get_cb</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>private mixed _get_cb( string $cb )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Callback for functions which query the current instance's attributes <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">string</td> <td align="left" valign="top">$cb</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">name of the function to call</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>mixed <p>String or int</td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="function__no_param_cb()"><h4>_no_param_cb</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>private void _no_param_cb( string $cb )</b><p> </td> </tr> <tr> <td width="10" align="left" valign="top"> </td> <td align="left" valign="top"> Callback for functions which flip or tile the current instance <br> <p> </td> </tr> <tr> <td colspan="2" align="left" valign="top">Parameter</td> </tr> <tr> <td></td> <td align="left" valign="top"> <table> <tr> <td align="left" valign="top">string</td> <td align="left" valign="top">$cb</td> <td align="left" valign="top"><code></code></td> </tr> <tr> <td></td> <td colspan="2" align="left" valign="top">name of the function to call</td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">Returns</td> <td>void <p></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> </table> </tr> <tr> <td align="left" valign="top"> <table width="100%" border="0"> <tr> <td colspan="2" align="left" valign="top"><h2>Private Field Details</h2></td> </tr> <tr><td colspan="2" align="left" valign="top"><a name="variable_$id"><h4>$id</h4></a></td></tr> <tr> <td colspan="2" align="left" valign="top"> <b>private integer $id</b> <p> >><code></code><< <p> The image resource id# <br> </td> </tr> <tr> <td align="left" valign="top">See Also</td> <td align="left" valign="top"><a href="#function_create()">create()</a>, <a href="#function_get_id()">get_id()</a></td> </tr> <tr> <td colspan="2" align="left" valign="top"><hr></td> </tr> </table> </tr> <tr> <td height="10" align="left" valign="top"><hr></td> </tr> <tr> <td align="left" valign="top" bgcolor="#C0C0C0"> <table> <tr> <td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td> <td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td> <td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td> <td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td> <td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td> <td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td> </tr> </table> </td> </tr> <tr> <td align="left" valign="top">PHPDoc 1.0beta</td> </tr> </table> </body> </html>