Comparing version 0.12.0 to 0.13.0
{ | ||
"name": "impro", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Image processing engine", | ||
@@ -50,3 +50,3 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", | ||
"prettier": "~2.2.1", | ||
"sharp": "~0.29.0", | ||
"sharp": "~0.30.0", | ||
"sinon": "^9.2.4", | ||
@@ -53,0 +53,0 @@ "svgfilter": "4.1.0", |
@@ -8,3 +8,2 @@ # Impro | ||
[![Coverage Status](https://coveralls.io/repos/papandreou/impro/badge.svg)](https://coveralls.io/r/papandreou/impro) | ||
[![Dependency Status](https://david-dm.org/papandreou/impro.svg)](https://david-dm.org/papandreou/impro) | ||
@@ -24,3 +23,3 @@ Impro allows specifying the operations to apply to images and will | ||
- Pngquant (npm install pngquant@^3.0.0) | ||
- Sharp (npm install sharp@~0.28.0) | ||
- Sharp (npm install sharp@~0.30.0) | ||
- SvgFilter (npm install svgfilter@^4.1.0) | ||
@@ -42,4 +41,4 @@ ``` | ||
supplied a set of command line arguments that act as a series of instructions | ||
for the properties of the image being output and anuy transformations to apply. | ||
Each of these options is modelled as an "operation". | ||
for the properties of the image being output and any series of transformations | ||
to apply. Each of these options is modelled as an "operation". | ||
@@ -46,0 +45,0 @@ ### Operations |
@@ -13,2 +13,3 @@ const Stream = require('stream'); | ||
let withoutEnlargement; | ||
let withoutReduction; | ||
let ignoreAspectRatio; | ||
@@ -26,2 +27,5 @@ | ||
continue; | ||
} else if (operation.name === 'withoutReduction') { | ||
withoutReduction = operation; | ||
continue; | ||
} else if (operation.name === 'ignoreAspectRatio') { | ||
@@ -97,2 +101,5 @@ ignoreAspectRatio = operation; | ||
} | ||
if (withoutReduction && resize) { | ||
resize.args[2] = '<'; | ||
} | ||
if (ignoreAspectRatio && resize) { | ||
@@ -127,2 +134,3 @@ resize.args[2] = '!'; | ||
'withoutEnlargement', | ||
'withoutReduction', | ||
'ignoreAspectRatio', | ||
@@ -143,2 +151,3 @@ ].concat( | ||
case 'withoutEnlargement': | ||
case 'withoutReduction': | ||
case 'ignoreAspectRatio': | ||
@@ -145,0 +154,0 @@ case 'progressive': |
@@ -31,2 +31,3 @@ const errors = require('../errors'); | ||
withoutEnlargement: () => ({ withoutEnlargement: true }), | ||
withoutReduction: () => ({ withoutReduction: true }), | ||
ignoreAspectRatio: () => ({ fit: 'fill' }), | ||
@@ -57,2 +58,3 @@ }; | ||
'withoutEnlargement', | ||
'withoutReduction', | ||
'ignoreAspectRatio', | ||
@@ -59,0 +61,0 @@ 'blur', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69125
1828
140