diff --git a/.gradle/4.10/fileChanges/last-build.bin b/.gradle/4.10/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/4.10/fileChanges/last-build.bin differ diff --git a/.gradle/4.10/fileHashes/fileHashes.lock b/.gradle/4.10/fileHashes/fileHashes.lock new file mode 100644 index 0000000..63f5096 Binary files /dev/null and b/.gradle/4.10/fileHashes/fileHashes.lock differ diff --git a/.gradle/4.10/gc.properties b/.gradle/4.10/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 0624b17..a51bc1a 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,67 @@ if you use maven, you can put it `${project.basedir}/libs`, and edit config file ``` -The usage of api, you can see example cases in `src/main/java/example`. \ No newline at end of file +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 ` 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 + + + diff --git a/src/main/resources/META-INF/lib/windows_64/webp-imageio.dll b/src/main/resources/META-INF/lib/windows_32/webp-imageio-1.0.3.dll old mode 100755 new mode 100644 similarity index 55% rename from src/main/resources/META-INF/lib/windows_64/webp-imageio.dll rename to src/main/resources/META-INF/lib/windows_32/webp-imageio-1.0.3.dll index 61bab7a..bb711e3 Binary files a/src/main/resources/META-INF/lib/windows_64/webp-imageio.dll and b/src/main/resources/META-INF/lib/windows_32/webp-imageio-1.0.3.dll differ diff --git a/src/main/resources/META-INF/lib/windows_32/webp-imageio.dll b/src/main/resources/META-INF/lib/windows_32/webp-imageio.dll deleted file mode 100755 index 3811223..0000000 Binary files a/src/main/resources/META-INF/lib/windows_32/webp-imageio.dll and /dev/null differ diff --git a/src/main/resources/META-INF/lib/windows_64/webp-imageio-1.0.3.dll b/src/main/resources/META-INF/lib/windows_64/webp-imageio-1.0.3.dll new file mode 100644 index 0000000..4ef18e5 Binary files /dev/null and b/src/main/resources/META-INF/lib/windows_64/webp-imageio-1.0.3.dll differ diff --git a/test_pic/test_.webp b/test_pic/test_.webp new file mode 100644 index 0000000..3a06522 Binary files /dev/null and b/test_pic/test_.webp differ