Image aspect ratio utility
npm install aspectratio




Image aspect ratio utilities.
```
npm install aspectratio --save
`js`
var aspect = require('aspectratio');
Apply a fixed aspect ratio crop without distoring the image aspect ratio.
* integer width - original image widthheight
* integer - original image heightratio
* string - new image ratio
> The ratio must be on the following format: x:y where x and y arex
> integers. The order of and z does not matter and 3:4 will be treated4:3
> as .
> By default #crop() will match the orientation of the original image unless a
> forced orientation is given on the follwing format: x:y!z where z isv
> the orientation ( for vertical, or h for horizontal).
#### Return
This will return an Array of four values:
1. integer x - top lef x coordinatey
2. integer - top lef y coordinatewidth
3. integer - new image widthheight
4. integer - new image height
#### Example
`js`
var crop = aspect.crop(2048, 768, '4:3');
// [512, 768, 1024, 768]
Get resized height and width of an image while perserving the aspect ratio of
the image.
* integer x - original image widthy
* integer - original image heightmaxX
* integer - max image widthmaxY
* integer - max image height
Returns an Array of the resized x and y values:
* integer x - resized image widthy` - resized image height
* integer