include the Zebra_Image library
require 'path/to/Zebra_Image.php';
instantiate the class
$img = new Zebra_Image();
a source image
$img->source_path = 'path/to/source.ext';
path to where should the resulting image be saved
note that by simply setting a different extension to the file will
instruct the script to create an image of that particular type
$img->target_path = 'path/to/target.ext';
rotate the image 45 degrees, clockwise
$img->rotate(45);
public rotate ( double $angle, mixed $background_color ) : boolean | ||
$angle | double | Angle by which to rotate the image clockwise. Between 0 and 360. @param mixed $background_color (Optional) The hexadecimal color (like "#FFFFFF" or "#FFF") of the uncovered zone after the rotation. When set to -1 the script will preserve transparency for transparent GIF and PNG images. For non-transparent images the background will be white in this case. Default is -1. @return boolean Returns TRUE on success or FALSE on error. If FALSE is returned, check the {@link error} property to see the error code. |
$background_color | mixed | |
return | boolean |