@eris/image
Advanced tools
Comparing version 0.2.1-alpha.12 to 0.2.1-alpha.13
@@ -39,6 +39,12 @@ "use strict"; | ||
return image.metadata().then(metadata => { | ||
let { width = 0, height = 0 } = metadata; | ||
if ((metadata.orientation || 0) > 4) { | ||
const realHeight = width; | ||
width = height; | ||
height = realHeight; | ||
} | ||
return { | ||
width: metadata.width, | ||
height: metadata.height, | ||
aspectRatio: metadata.width / metadata.height, | ||
width, | ||
height, | ||
aspectRatio: width / height, | ||
}; | ||
@@ -45,0 +51,0 @@ }); |
@@ -31,6 +31,13 @@ import * as sharp from 'sharp' | ||
return image.metadata().then(metadata => { | ||
let {width = 0, height = 0} = metadata | ||
if ((metadata.orientation || 0) > 4) { | ||
const realHeight = width | ||
width = height | ||
height = realHeight | ||
} | ||
return { | ||
width: metadata.width!, | ||
height: metadata.height!, | ||
aspectRatio: metadata.width! / metadata.height!, | ||
width, | ||
height, | ||
aspectRatio: width / height, | ||
} | ||
@@ -37,0 +44,0 @@ }) |
{ | ||
"name": "@eris/image", | ||
"version": "0.2.1-alpha.12", | ||
"version": "0.2.1-alpha.13", | ||
"description": "Collection of image manipulation libraries for node and the browser.", | ||
@@ -38,3 +38,3 @@ "main": "./dist/node-index.js", | ||
"dependencies": { | ||
"@eris/exif": "0.2.1-alpha.12", | ||
"@eris/exif": "0.2.1-alpha.13", | ||
"buffer": "^5.2.0", | ||
@@ -71,3 +71,3 @@ "file-type": "^7.0.1", | ||
}, | ||
"gitHead": "f6be5773b7b29002560033266ab76e0f553e9455" | ||
"gitHead": "cb13624b9b3f57153cf5de8b7db1b5ad47068b19" | ||
} |
Sorry, the diff of this file is not supported yet
1690421
14514
+ Added@eris/exif@0.2.1-alpha.13(transitive)
- Removed@eris/exif@0.2.1-alpha.12(transitive)
Updated@eris/exif@0.2.1-alpha.13