Skip to content

Commit

Permalink
Add jpeg image orientation to the readme (#366)
Browse files Browse the repository at this point in the history
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
  • Loading branch information
ntnz and netroy committed Aug 4, 2021
1 parent 71e1410 commit a38b56f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ const imageSize = require('image-size')
imageSize.disableFS(true)
```

### JPEG image orientation

If the orientation is present in the JPEG EXIF metadata, it will be returned by the function. The orientation value is a [number between 1 and 8](https://exiftool.org/TagNames/EXIF.html#:~:text=0x0112,8%20=%20Rotate%20270%20CW) representing a type of orientation.

```javascript
const sizeOf = require('image-size')
const dimensions = sizeOf('images/photo.jpeg')
console.log(dimensions.orientation)
```

## Command-Line Usage (CLI)

```shell
Expand Down

0 comments on commit a38b56f

Please sign in to comment.