rotate¶
rotate pixels a given amount of 90 degree turns
$ pierogis rotate ./input.jpg -t 1 --ccw
Use -t
to indicate the number of turns (defaults to 1).
Use -a
to indicate the degree magnitude of each turn (defaults to 90).
Use --ccw
to turn counterclockwise instead.
Use --resample-filter
to define a PIL resample filter (defaults to nearest neighbor).
See PIL documentation on filters.
choices = {
'default': Image.NEAREST,
'nearest': Image.NEAREST,
'box': Image.BOX,
'bicubic': Image.BICUBIC,
'bilinear': Image.BILINEAR,
'hamming': Image.HAMMING,
'lanczos': Image.LANCZOS,
}
sort uses this under the hood.
arg |
description |
default |
valid |
---|---|---|---|
|
number of clockwise turns |
|
|
|
degrees to rotate through each turn |
|
|
|
if provided, |
|
flag |
|
a filter to be used with resizing |
|
|
See: RotateFilling
, Rotate