[Top]
Image
Image.Image
|
Method Image.Image()->rotate()
- Method
rotate
-
object rotate(int|float angle)
object rotate(int|float angle, int r, int g, int b)
object rotate_expand(int|float angle)
object rotate_expand(int|float angle, int r, int g, int b)
- Description
-
-
Rotates an image a certain amount of degrees (360° is
a complete rotation) counter-clockwise:
 |
 |
 |
original |
->rotate(15,255,0,0); |
->rotate_expand(15); |
The "expand" variant of functions stretches the
image border pixels rather then filling with
the given or current color.
This rotate uses the skewx () and skewy () functions.
- Parameter angle
-
-
the number of degrees to rotate
- Parameter r
-
- Parameter g
-
- Parameter b
-
-
color to fill with; default is current
- Returns
-
-
the new image object
|