Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libwebp binary usage #1

Open
Novikolay opened this issue Dec 4, 2024 · 0 comments
Open

libwebp binary usage #1

Novikolay opened this issue Dec 4, 2024 · 0 comments

Comments

@Novikolay
Copy link

Hello @Tianscar! In your ReadMe states:

Remember this library do not contain the libwebp binary!
If the target system do not have libwebp binary pre-installed, you MUST put the binary to the java.library.path!
For pre-compiled libwebp binaries, see https://developers.google.com/speed/webp/download.

I am download, unzip and add binaries from libwebp-1.4.0-windows-x64.zip (by your link) to my binary to the java.library.path, but i am take error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: unknown
Library names
[webp]
Search paths:
[C:\Git\github\animated-webp-lib-for-java\src\main\resources\Windows, C:\Java\jdk1.8.0_281\bin, C:\Windows\Sun\Java\bin, C:\Windows\system32, C:\Windows, C:\Python27\Scripts\, C:\Python27\, C:\Python312\Scripts\, C:\Python312\, C:\Program Files\Common Files\Oracle\Java\javapath, C:\Program Files (x86)\Common Files\Oracle\Java\javapath, C:\Program Files\Eclipse Adoptium\jdk-17.0.9.9-hotspot\bin, C:\Program Files\Eclipse Adoptium\jdk-11.0.21.9-hotspot\bin, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0\, C:\Windows\System32\OpenSSH\, C:\ProgramData\chocolatey\bin, C:\ProgramData\nvm, C:\Program Files\nodejs, C:\Program Files (x86)\Yarn\bin\, C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin, C:\Program Files\Git\cmd, C:\Users\novikolay\bin, C:\Users\novikolay\AppData\Local\Android\sdk\platform-tools, C:\Program Files\PowerShell\7\, C:\Program Files\Docker\Docker\resources\bin, C:\Users\novikolay\AppData\Local\Microsoft\WindowsApps, C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.2\bin, , C:\Users\novikolay\AppData\Local\Programs\oh-my-posh\bin, C:\Users\novikolay\AppData\Local\Programs\Microsoft VS Code\bin, C:\Users\novikolay\AppData\Roaming\npm, C:\Users\novikolay\AppData\Local\nvs\, C:\Users\novikolay\AppData\Local\Yarn\bin, .]
	at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:111)
	at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:85)
	at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:64)
	at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:74)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:141)
	at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:87)
	at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:44)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:420)
	at jnr.ffi.LibraryLoader.load(LibraryLoader.java:399)
	at com.tianscar.webp.JNRFFI$WebP.<clinit>(JNRFFI.java:23)
	at com.tianscar.webp.WebPFactory.encodeBGR(WebPFactory.java:360)
	at com.tianscar.webp.test.EncodeWebPExample.main(EncodeWebPExample.java:90)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':EncodeWebPExample.main()'.
> Process 'command 'C:/Java/jdk1.8.0_281/bin/java.exe'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
14:49:17: Execution finished ':EncodeWebPExample.main()'.

Also i try set WebP INSTANCE LibraryLoader manually (just add .search(my_path)), but its not work too.

Could this be due to the fact that the specified archive contains only libwebp.lib, libwebpmux.lib and libwebpdemux.lib, instead of the required webp? Where can I get it then, becouse this archive does not contain any files with name webp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant