Deprecate background, add op-specific prop to resize/extend/flatten #1392

This commit is contained in:
Lovell Fuller
2018-10-01 20:58:55 +01:00
parent 6007e13a22
commit a64844689e
17 changed files with 378 additions and 296 deletions

View File

@@ -105,6 +105,7 @@ const Sharp = function (input, options) {
height: -1,
canvas: 'crop',
position: 0,
resizeBackground: [0, 0, 0, 255],
useExifOrientation: false,
angle: 0,
rotationAngle: 0,
@@ -116,14 +117,15 @@ const Sharp = function (input, options) {
extendBottom: 0,
extendLeft: 0,
extendRight: 0,
extendBackground: [0, 0, 0, 255],
withoutEnlargement: false,
kernel: 'lanczos3',
fastShrinkOnLoad: true,
// operations
background: [0, 0, 0, 255],
tintA: 128,
tintB: 128,
flatten: false,
flattenBackground: [0, 0, 0],
negate: false,
medianSize: 0,
blurSigma: 0,