Extra Wp2 Options (#853)

* wip

* wip

* Add extra options

* Even more options!

* Update src/features/encoders/wp2/client/index.tsx

Co-authored-by: Surma <surma@surma.dev>

Co-authored-by: Surma <surma@surma.dev>
This commit is contained in:
Jake Archibald
2020-11-20 16:12:38 +00:00
committed by GitHub
parent f11e692d58
commit 13631f1cfc
7 changed files with 339 additions and 90 deletions

View File

@@ -11,16 +11,21 @@
* limitations under the License.
*/
import type { EncodeOptions } from 'codecs/wp2/enc/wp2_enc';
import { UVMode, Csp } from 'codecs/wp2/enc/wp2_enc';
export { EncodeOptions };
export { EncodeOptions, UVMode, Csp };
export const label = 'WebP v2 (unstable)';
export const mimeType = 'image/webp2';
export const extension = 'wp2';
export const defaultOptions: EncodeOptions = {
quality: 75,
alpha_quality: 100,
alpha_quality: 75,
speed: 5,
pass: 1,
sns: 50,
uv_mode: UVMode.UVModeAuto,
csp_type: Csp.kYCoCg,
error_diffusion: 0,
use_random_matrix: false,
};