Last updated: 2021-07-20 16:41:19


    CI uses the imageMogr2 API to rotate an image by a specified angle or automatically.

    API Format


    Spaces and line breaks above are for readability only and can be ignored.


    Parameter Description
    download_url URL of the input image, formatted as <bucketname-appid>.cos.<picture region="">.<domain>.com/<picture name="">
    /rotate/&dxlt;rotateDegree> Rotates an image clockwise by a specified angle. Value range: 0−360. By default, the image is not rotated.
    /auto-orient Auto-rotates an image based on its EXIF orientation tag.
    /flip/&dxlt;flip&dxgt; Flips an image. Valid values: vertical, horizontal
    /ignore-error/1 If this parameter is carried and the image failed to be processed because it is too large, the input image will be returned with no error reported.


    Rotating an image by a specified angle
    This example rotates an image clockwise by 90 degrees:

    Output image:

    Rotating an image by a specified angle with a signature carried

    This example processes the image in the same way as in the example above except that a signature is carried. The signature is joined with other processing parameters using an ampersand (&):<signature>&imageMogr2/rotate/90

    You can obtain the value of <signature> by referring to Request Signature.