Prevent auto-rotate fail for libmagick formats #117

This commit is contained in:
Lovell Fuller
2014-11-08 12:07:47 +00:00
parent f7c2a839ad
commit 740838b47c
2 changed files with 19 additions and 1 deletions

View File

@@ -68,6 +68,21 @@ describe('Rotation', function() {
});
});
it('Attempt to auto-rotate image format without EXIF support', function(done) {
sharp(fixtures.inputGif)
.rotate()
.resize(320)
.jpeg()
.toBuffer(function(err, data, info) {
if (err) throw err;
assert.strictEqual(true, data.length > 0);
assert.strictEqual('jpeg', info.format);
assert.strictEqual(320, info.width);
assert.strictEqual(213, info.height);
done();
});
});
it('Rotate to an invalid angle, should fail', function(done) {
var fail = false;
try {