Skip to content

Commit b349da7

Browse files
committed
Made "reduction_effort" correspond to "method" option. Also added "auto-filter" to unsupported options - (it should have been there in the first place). Closes #271
1 parent 97b18b4 commit b349da7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Convert/Converters/Vips.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Vips extends AbstractConverter
2525
protected function getUnsupportedDefaultOptions()
2626
{
2727
return [
28+
'auto-filter',
2829
'size-in-percentage',
2930
'use-nice'
3031
];
@@ -35,8 +36,7 @@ protected function createOptions()
3536
parent::createOptions();
3637

3738
$this->options2->addOptions(
38-
new BooleanOption('smart-subsample', false),
39-
new IntegerOption('reduction_effort', 4, 0, 6)
39+
new BooleanOption('smart-subsample', false)
4040
);
4141
}
4242

@@ -187,6 +187,9 @@ private function createParamsForVipsWebPSave()
187187
$options['Q'] = $this->options['near-lossless'];
188188
}
189189
}
190+
if ($this->options['method'] !== 4) {
191+
$options['reduction_effort'] = $this->options['method'];
192+
}
190193

191194
return $options;
192195
}

0 commit comments

Comments
 (0)