You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Image {
companion object {
fun convertToWebP(fileStream: InputStream): ByteArray {
val image = ImmutableImage.loader().fromStream(fileStream)
val writer: WebpWriter
try {
writer = WebpWriter().withM(6).withQ(75)
} catch (e: Exception) {
e.printStackTrace()
throw e
}
return image.bytes(writer)
}
}
}
Running locally from intelliJ with amazoncorretto:21, when I invoke the WebpWriter() for the first time, it installs the binaries as expected:
c.sksamuel.scrimage.webp.WebpHandler - Installing binary at /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/cwebp16223531167641905488binary
c.sksamuel.scrimage.webp.WebpHandler - Setting executable /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/cwebp16223531167641905488binary
c.sksamuel.scrimage.webp.WebpHandler - Installing binary at /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/dwebp7146283123708512948binary
c.sksamuel.scrimage.webp.WebpHandler - Setting executable /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/dwebp7146283123708512948binary
I build a docker image with the same runtime. When I make the initial request to the service, it only installs the dwebp binary and then fails.
I tried to follow the instructions at https://sksamuel.github.io/scrimage/webp/ to override some of the behaviour, but it doesn't seem to work.
I've tried things like invoking the installer method at app startup - this actually shows that the cwebp binary installed at some directory, but the same error happens.
I've also tried to install the webp tools during the build process and copy them into a directory, and override the system property with that directory in hopes it would find the binary files.
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
//build.gradle.kts
implementation("com.sksamuel.scrimage:scrimage-core:4.2.0")
implementation("com.sksamuel.scrimage:scrimage-webp:4.2.0")
I invoke my method
convertToWebP
class Image {
companion object {
fun convertToWebP(fileStream: InputStream): ByteArray {
val image = ImmutableImage.loader().fromStream(fileStream)
val writer: WebpWriter
try {
writer = WebpWriter().withM(6).withQ(75)
} catch (e: Exception) {
e.printStackTrace()
throw e
}
}
Running locally from intelliJ with amazoncorretto:21, when I invoke the WebpWriter() for the first time, it installs the binaries as expected:
c.sksamuel.scrimage.webp.WebpHandler - Installing binary at /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/cwebp16223531167641905488binary
c.sksamuel.scrimage.webp.WebpHandler - Setting executable /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/cwebp16223531167641905488binary
c.sksamuel.scrimage.webp.WebpHandler - Installing binary at /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/dwebp7146283123708512948binary
c.sksamuel.scrimage.webp.WebpHandler - Setting executable /var/folders/fr/t2msts2x4psf58xxklmsxgb00000gn/T/dwebp7146283123708512948binary
I build a docker image with the same runtime. When I make the initial request to the service, it only installs the dwebp binary and then fails.
I tried to follow the instructions at https://sksamuel.github.io/scrimage/webp/ to override some of the behaviour, but it doesn't seem to work.
I've tried things like invoking the installer method at app startup - this actually shows that the cwebp binary installed at some directory, but the same error happens.
I've also tried to install the webp tools during the build process and copy them into a directory, and override the system property with that directory in hopes it would find the binary files.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: