Images, being captured on cameras (including mobiles devices), often have an EXIF attribute for orientation, indicating the true orientation of the image. This information can later be used by different software to correctly display the image.
When no transformation is applied, Cloudinary delivers the original image, untouched, including its EXIF information.
However, if the image is transformed (regardless of the nature of the transformation) Cloudinary will also automatically orientate the image based on its EXIF information, and then strip this information in order to generate a lighter image for delivery. This will result in a faster load time and less bandwidth consumption.
For example, the following is an original captured image with its EXIF information below:
http://res.cloudinary.com/demo/image/upload/exif_sample.jpg
And now, here is the same image resized and transformed with `e_grayscale`
.
http://res.cloudinary.com/demo/image/upload/w_0.12,e_grayscale/exif_sample.jpg
Notice that the transformed image was automatically orientated in addition to the requested transformation.
Sometimes we might want to prevent this auto-orientation, and this can be done by setting the 'angle' parameter to 'ignore' (i.e. `a_ignore`), for example:
http://res.cloudinary.com/demo/image/upload/w_0.12,e_grayscale,a_ignore/exif_sample.jpg
Comments
2 comments
in the iOS SDK, the {"angle": "ignore"} doesn't work.
Following code snippet should do the trick:
CLTransformation* transformation = [[CLTransformation alloc] init];
[transformation setAngle:@"ignore"];
NSString *url = [cloudinary url:@"sample.jpg"
options:@{@"transformation": transformation}];
Please sign in to leave a comment.