Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leny/pwoposyon
Compute ratio and dimensions for images resizing.
https://github.com/leny/pwoposyon
Last synced: 2 days ago
JSON representation
Compute ratio and dimensions for images resizing.
- Host: GitHub
- URL: https://github.com/leny/pwoposyon
- Owner: leny
- License: mit
- Created: 2015-12-10T22:55:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T00:15:38.000Z (about 9 years ago)
- Last Synced: 2024-12-29T08:42:44.493Z (about 2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# pwopòsyon
> Compute ratio and dimensions for images resizing, because… maths.
* * *
## Example
```javascript
var pwoposyon = require( "pwoposyon" );
pwoposyon( iWidth, iHeight ).fitIn( iWidth, iHeight ) // returns { ratio: Number, dimensions: { width: Number, height: Number } }
pwoposyon( iWidth, iHeight ).cropIn( iWidth, iHeight ) // returns { ratio: Number, dimensions: { width: Number, height: Number } }
pwoposyon( iWidth, iHeight ).byRatio( iRatio ) // returns { ratio: Number, dimensions: { width: Number, height: Number } }pwoposyon( [ iWidth, iHeight ] ).fitIn( [ iWidth, iHeight ] )
pwoposyon( [ iWidth, iHeight ] ).cropIn( [ iWidth, iHeight ] )pwoposyon( { width: Number, height: Number } ).fitIn( { width: Number, height: Number } )
pwoposyon( { width: Number, height: Number } ).cropIn( { width: Number, height: Number } )```
## Documentation
_(soon)_
## License
Copyright (c) 2015 Leny
Licensed under the MIT license.