Service Endpoint

https://edge.sandcage.com/<YOUR REAL-TIME PROCESSING ENDPOINT KEY>/0.2/rotate


Request Parameters

url*
requiredThe relative or absolute URL path of the source image.
To mask the absolute path of a given source file an origin mapping can be assigned to the Realtime API Key.
degrees
optionalOne of the following values:
  • 90
  • 180
  • 270
The amount of the degrees to rotate clock-wise.
If omitted, then no rotation will be applied. If the value is not one the accepted values, then an error will be thrown.
compress
optionalA boolean representation of whether or not the resulting image should be compressed.
Available options:
  • true
  • false

Default is false.
format
optionalWhether or not the file format of the resulting image should be converted to one that will produce a file with smaller file size. The returned image file format will depend on the support of the client software (e.g. browser). If omitted or set to false, then the returned image file format will be the same as the source image.
Available options:
  • auto
  • false

Default is false.
progressive
optionalA boolean representation of whether or not the file is encoded in a format that allows for progressively higher detail to be decoded prior to the complete image being delivered. Some browser limitation apply (see here). If "compress" is omitted or set to "false" it will be overrided and set to "true".
Only available for JPEGs.
Available options:
  • true
  • false

Default is false.
optimize
optionalA boolean representation of whether the engine will attempt to optimize the Huffman coding tables. If "compress" is omitted or set to "false" it will be overrided and set to "true".
Only available for JPEGs.
Available options:
  • true
  • false

Default is false.

Rotate 90° Example Request

This request will return an image rotated by 90 degrees.

https://edge.sandcage.com/18e102bea84860764a07dca77adbf145157751b7/0.2/rotate?url=p%2Fa%2Fimg%2Fothers%2Fbefore.jpg&degrees=90

Result


Rotate 180° with Compression Enabled Example Request

This request will return an image rotated by 180 degrees and compressed.

https://edge.sandcage.com/18e102bea84860764a07dca77adbf145157751b7/0.2/rotate?url=p%2Fa%2Fimg%2Fothers%2Fbefore.jpg&degrees=180&compress=true

Result


Rotate 270° with Auto-Format Enabled Example Request

This request will return an image rotated by 270 degrees and will also be converted to the most suitable file format.

https://edge.sandcage.com/18e102bea84860764a07dca77adbf145157751b7/0.2/rotate?url=p%2Fa%2Fimg%2Fothers%2Fbefore.jpg&degrees=270&format=auto

Result


Rotate 90° with Compression and Auto-Format Enabled Example Request

This request will return an image rotated by 90 degrees. The returned image will also be compressed and converted to the most suitable file format.

https://edge.sandcage.com/18e102bea84860764a07dca77adbf145157751b7/0.2/rotate?url=p%2Fa%2Fimg%2Fothers%2Fbefore.jpg&degrees=90&format=auto&compress=true

Result


Give it a try

You can adjust the options below to produce the respective parameters and see the resulting image.

https://edge.sandcage.com/18e102bea84860764a07dca77adbf145157751b7/0.2/rotate?url=p%2Fa%2Fimg%2Fothers%2Fbefore.jpg&degrees=0

Result


Still Have Questions?

We're always happy to help with code and integrations. Talk to us!