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

WebP is supported on mac-arm64 without extra configurations #288

Open ellet0 opened 2 months ago

ellet0 commented 2 months ago

In this page

It says:

you must specify the system-property: com.sksamuel.scrimage.webp.platform=mac-arm64 because scrimage is unable to detect mac-x64 >from mac-arm64, and defaults to the former.

But I just used it today on macOS and it seems to working fine with the mac-arm64 and not the x64 using Rosetta on Apple silicon

See the log:

[2024-04-17 10:24:00] - Installing binary at /var/folders/g1/fbqmwzhn52s9xg14756wg6s00000gn/T/dwebp8225632534906842205binary
[2024-04-17 10:24:00] - Trying source from /webp_binaries/dwebp
[2024-04-17 10:24:00] - Trying source from /webp_binaries/mac_arm64/dwebp
[2024-04-17 10:24:00] - Trying source from /dist_webp_binaries/libwebp-1.3.2-mac-arm64/bin/dwebp
[2024-04-17 10:24:00] - Source detected /dist_webp_binaries/libwebp-1.3.2-mac-arm64/bin/dwebp
[2024-04-17 10:24:00] - Setting executable /var/folders/g1/fbqmwzhn52s9xg14756wg6s00000gn/T/dwebp8225632534906842205binary
[2024-04-17 10:24:01] - Installing binary at /var/folders/g1/fbqmwzhn52s9xg14756wg6s00000gn/T/cwebp7408541294219784463binary
[2024-04-17 10:24:01] - Trying source from /webp_binaries/cwebp
[2024-04-17 10:24:01] - Trying source from /webp_binaries/mac_arm64/cwebp
[2024-04-17 10:24:01] - Trying source from /dist_webp_binaries/libwebp-1.3.2-mac-arm64/bin/cwebp
[2024-04-17 10:24:01] - Source detected /dist_webp_binaries/libwebp-1.3.2-mac-arm64/bin/cwebp
[2024-04-17 10:24:01] - Setting executable /var/folders/g1/fbqmwzhn52s9xg14756wg6s00000gn/T/cwebp7408541294219784463binary

image

it was using the mac-arm64 version and I have macOS Apple silicon, the docs might be outdated and the library managed to solve this issue without extra configurations but it didn't updated the docs which is why I open this issue just as remainder, I'm not sure if I'm missing something

image