欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放

imagerotate

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

imagerotate用給定角度旋轉圖像

說(shuō)明

imagerotate(
    resource $image,
    float $angle,
    int $bgd_color,
    int $ignore_transparent = 0
): resource

src_im 圖像用給定的 angle 角度旋轉。bgd_color 指定了旋轉后沒(méi)有覆蓋到的部分的顏色。

旋轉的中心是圖像的中心,旋轉后的圖像會(huì )按比例縮小以適合目標圖像的大小——邊緣不會(huì )被剪去。

參數

image

由圖象創(chuàng )建函數(例如imagecreatetruecolor())返回的 GdImage 對象。

angle

Rotation angle, in degrees. The rotation angle is interpreted as the number of degrees to rotate the image anticlockwise.

bgd_color

Specifies the color of the uncovered zone after the rotation

ignore_transparent

如果被設為非零值,則透明色會(huì )被忽略(否則會(huì )被保留)。

返回值

返回旋轉后的圖像資源, 或者在失敗時(shí)返回 false。

更新日志

版本 說(shuō)明
5.1.0 新增: ignore_transparent 。

范例

示例 #1 將圖像旋轉 180 度

本例將把一幅圖像旋轉 180 度——上下顛倒。

<?php
// File and rotation
$filename 'test.jpg';
$degrees 180;

// Content type
header('Content-type: image/jpeg');

// Load
$source imagecreatefromjpeg($filename);

// Rotate
$rotate imagerotate($source$degrees0);

// Output
imagejpeg($rotate);
?>

以上例程的輸出類(lèi)似于:

例子的輸出:將圖像旋轉 180 度

注釋

欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放