update: how to compile native library and new win dll
This commit is contained in:
parent
95716b340f
commit
f835b73a81
BIN
.gradle/4.10/fileChanges/last-build.bin
Normal file
BIN
.gradle/4.10/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
.gradle/4.10/fileHashes/fileHashes.lock
Normal file
BIN
.gradle/4.10/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
0
.gradle/4.10/gc.properties
Normal file
0
.gradle/4.10/gc.properties
Normal file
65
README.md
65
README.md
@ -36,4 +36,67 @@ if you use maven, you can put it `${project.basedir}/libs`, and edit config file
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
The usage of api, you can see example cases in `src/main/java/example`.
|
The usage of api, you can see example cases in `src/main/java/example`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Compiling the native library
|
||||||
|
|
||||||
|
download source code of [webp project of Luciad](https://bitbucket.org/luciad/webp-imageio) , and unzip it.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
wget https://bitbucket.org/luciad/webp-imageio/get/873c5677244b.zip -O luciad-webp-imageio-873c5677244b.zip
|
||||||
|
unzip luciad-webp-imageio-873c5677244b.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
download source code of [google webp project](https://chromium.googlesource.com/webm/libwebp)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://chromium.googlesource.com/webm/libwebp
|
||||||
|
```
|
||||||
|
|
||||||
|
or use the [mirror repo](https://github.com/webmproject/libwebp)
|
||||||
|
|
||||||
|
copy folder libwebp into folder luciad-webp-imageio-873c5677244b, and create a directory called `build` in the folder luciad-webp-imageio-873c5677244b
|
||||||
|
|
||||||
|
folder tree like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
luciad-webp-imageio-873c5677244b/
|
||||||
|
|_ build/ <-- just created
|
||||||
|
|_ gradle/
|
||||||
|
|_ src/
|
||||||
|
|_ libwebp/ <-- copy from project libwebp
|
||||||
|
|_ .hgignore
|
||||||
|
|....
|
||||||
|
|.... (other files)
|
||||||
|
```
|
||||||
|
|
||||||
|
Install CMake 2.8 or newer. CMake can be downloaded from [www.cmake.org](http://www.cmake.org/) or installed using your systems package manager. if you use Win10 and VS 2019, it need CMake 3.14 or newer.
|
||||||
|
|
||||||
|
Open a terminal and navigate to the newly created 'build' directory.
|
||||||
|
|
||||||
|
```
|
||||||
|
cd ./build
|
||||||
|
cmake ..
|
||||||
|
cmake --build .
|
||||||
|
```
|
||||||
|
|
||||||
|
The compiled library can be found under the directory `build/src/main/c`
|
||||||
|
|
||||||
|
if you need specific the generator-name, please add `-G <generator-name>` parameter for cmake, like this
|
||||||
|
|
||||||
|
```shell
|
||||||
|
// cmake ..
|
||||||
|
cmake .. -G "Visual Studio 16 2019"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Compiling the Java library
|
||||||
|
|
||||||
|
- Run `./gradlew build -x test` in the root of the project
|
||||||
|
- The compiled Java library can be found under the `build` directory
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
BIN
src/main/resources/META-INF/lib/windows_64/webp-imageio.dll → src/main/resources/META-INF/lib/windows_32/webp-imageio-1.0.3.dll
Executable file → Normal file
BIN
src/main/resources/META-INF/lib/windows_64/webp-imageio.dll → src/main/resources/META-INF/lib/windows_32/webp-imageio-1.0.3.dll
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
test_pic/test_.webp
Normal file
BIN
test_pic/test_.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Loading…
Reference in New Issue
Block a user