image_gd_rotate
includes/image.inc, строка 275
- Версии
- 5
image_gd_rotate($source, $destination, $degrees,
$bg_color= 0)- 6
image_gd_rotate($source, $destination, $degrees, $background = 0x000000)
Rotate an image the given number of degrees.
Код
<?php
function image_gd_rotate($source, $destination, $degrees, $bg_color = 0) {
if (!function_exists('imageRotate')) {
return FALSE;
}
$info = image_get_info($source);
if (!$info) {
return FALSE;
}
$im = image_gd_open($source, $info['extension']);
if (!$im) {
return FALSE;
}
$res = imageRotate($im, $degrees, $bg_color);
$result = image_gd_close($res, $destination, $info['extension']);
return $result;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии