Utility Functions

 

int imagesx  ( resource image )
Returns the width of the image identified by image.

int imagesy  ( resource image )
Returns the height of the image identified by image.

bool imageIsTrueColor  ( resource image )
Returns TRUE if the image image is a truecolor image.

int imageInterlace  ( resource image [, int interlace] )
Turns the interlace bit on or off. If interlace is 1 the image will be interlaced, and if interlace is 0 the interlace bit is turned off. If the image is used as a JPEG image, the image is created as a progressive JPEG.
This function returns whether the interlace bit is set for the image.
Interlaced images have their rows stored in some order that is more or less uniformly distributed throughout the image, rather than sequentially. Web browsers make use of this by displaying a crude representation of the image which gets finer over time as the image finishes loading. This is sometimes convenient because it allows the user to see a general impression of the whole image without having to wait for all of it to load.
bool imageAntialias  ( int im, bool on )
Should antialias functions be used or not. This function is currently not documented; only the argument list is available.
This term aliasing is originally from signal processing where it refers to an undersampled function yielding unwanted results. In imaging an example is a diagonal line drawn on a low-resolution raster display, yielding an undesirable "staircase" look. Antialiasing smooths out this discretization of an image by padding pixels with intermediate colors.
aliased antialiased