sksamuel / scrimage

JVM - Java, Kotlin, Scala image processing library
https://sksamuel.github.io/scrimage
Apache License 2.0
1.05k stars 140 forks source link

Added the option to use multithreading when encoding webp #287

Closed leeshinyook closed 2 months ago

leeshinyook commented 2 months ago

Hello.

First of all, thank you for creating an awesome JVM library and providing it as open source.

I'm using the scrimage library for webp encoding. It seems to be using cwebp for encoding, and I can apply several option flags, including noalpha. I think it would be nice to additionally support the (-mt) multithread option provided by cwebp.

The multithread feature is already provided in libwebp-1.3.2 cwebp, so if it is provided as an optional flag, I think it will work fine. I've added a new constructor for WebpWriter (keeping the old ones), and I don't think there should be any problems with backwards compatibility since the mt option defaults to false. If you don't mind, I hope you will accept my MR.

스크린샷 2024-04-12 오후 11 14 51
sksamuel commented 2 months ago

great thanks