flip_both() 공개 메소드

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'; flip the image both horizontally and vertically $img->flip_both();
부터: 2.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.
public flip_both ( ) : boolean
리턴 boolean
예제 #1
0
 // and if there is an error, show the error message
 if (!$image->flip_horizontal()) {
     show_error($image->error, $image->source_path, $image->target_path);
 }
 // indicate a target image
 $image->target_path = 'results/flip-v.' . $ext;
 // flip vertically
 // and if there is an error, show the error message
 if (!$image->flip_vertical()) {
     show_error($image->error, $image->source_path, $image->target_path);
 }
 // indicate a target image
 $image->target_path = 'results/flip-b.' . $ext;
 // flip both horizontally and vertically
 // and if there is an error, show the error message
 if (!$image->flip_both()) {
     show_error($image->error, $image->source_path, $image->target_path);
 }
 // indicate a target image
 $image->target_path = 'results/crop.' . $ext;
 // crop
 // and if there is an error, show the error message
 if (!$image->crop(0, 0, 50, 50)) {
     show_error($image->error, $image->source_path, $image->target_path);
 }
 // indicate a target image
 $image->target_path = 'results/rotate.' . $ext;
 // rotate
 // and if there is an error, show the error message
 if (!$image->rotate(45)) {
     show_error($image->error, $image->source_path, $image->target_path);