Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

auto-rotate

vonheim218ISC1.0.8

Auto rotate JPEG images based on their EXIF Orientation tag. Promise based API.

autorotate, rotate, exif, jpg, jpeg, promise

readme

auto-rotate

Auto rotate JPEG images based on their EXIF Orientation tag. Promise based API.

Installation

$ npm install auto-rotate

Basic example

var rotator = require('auto-rotate');

rotator.autoRotateFile('rotated.jpg', 'fixed.jpg')
.then(function(rotated) {
    console.log(rotated ? 'Image rotated' : 'No rotation was needed');
}).catch(function(err) {
    console.error('Got error: '+err);
});