Rotate
class Rotate extends BaseAction implements RotationDegreeInterface, RotationModeInterface
Rotates or flips an image or video by the specified number of degrees, or automatically (images only) according to its orientation or available metadata.
Learn more: Rotating images | Rotating videos
Methods
Rotate constructor.
Adds the qualifier to the action.
Adds qualifiers to the action.
Adds (sets) generic (raw) action.
Sets the flag.
Removes the flag.
Serializes to json.
Serializes to Cloudinary URL format
Rotate image 90 degrees clockwise.
Rotate image 180 degrees.
Rotate image 90 degrees counterclockwise.
Rotate an image by the given degrees.
Rotate image 90 degrees clockwise only if the requested aspect ratio does not match the image's aspect ratio.
Rotate image 90 degrees counterclockwise only if the requested aspect ratio does not match the image's aspect ratio.
Vertical mirror flip of the image.
Horizontal mirror flip of the image.
By default, the image is automatically rotated according to the EXIF data stored by the camera when the image was taken. Set the angle to 'ignore' if you do not want the image to be automatically rotated.
Sets the rotation angle.
Named constructor.
Named constructor.
Details
__construct(mixed ...$degree)
Rotate constructor.
$this
addQualifier(BaseComponent $qualifier = null)
Adds the qualifier to the action.
$this
addQualifiers(array ...$qualifiers)
Adds qualifiers to the action.
BaseAction
setGenericAction(string $action)
Adds (sets) generic (raw) action.
$this
setFlag(FlagQualifier $flag, bool $set = true)
Sets the flag.
$this
unsetFlag(FlagQualifier $flag)
Removes the flag.
$this
importAction(BaseAction|null $action)
Imports (merges) qualifiers and flags from another action.
mixed
jsonSerialize()
Serializes to json.
string
__toString()
Serializes to Cloudinary URL format
static AngleTrait
deg90()
Rotate image 90 degrees clockwise.
static AngleTrait
deg180()
Rotate image 180 degrees.
static AngleTrait
deg270()
Rotate image 90 degrees counterclockwise.
static AngleTrait
byAngle(int|array ...$degree)
Rotate an image by the given degrees.
static RotationModeTrait
autoRight()
Rotate image 90 degrees clockwise only if the requested aspect ratio does not match the image's aspect ratio.
static RotationModeTrait
autoLeft()
Rotate image 90 degrees counterclockwise only if the requested aspect ratio does not match the image's aspect ratio.
static RotationModeTrait
verticalFlip()
Vertical mirror flip of the image.
static RotationModeTrait
horizontalFlip()
Horizontal mirror flip of the image.
static RotationModeTrait
ignore()
By default, the image is automatically rotated according to the EXIF data stored by the camera when the image was taken. Set the angle to 'ignore' if you do not want the image to be automatically rotated.
static RotationModeTrait
mode(string|RotationMode|array ...$mode)
Rotate an image using the given mode.
setAngle(mixed ...$degree)
Sets the rotation angle.
static Rotate
createWithDegree(mixed ...$degree)
Named constructor.
static Rotate
createWithMode(mixed ...$mode)
Named constructor.
Constants
MAIN_QUALIFIER |
|