webp-imageio icon indicating copy to clipboard operation
webp-imageio copied to clipboard

Support multiple architectures

Open gotson opened this issue 5 years ago • 16 comments
trafficstars

This PR would address #5

I added some Travis tests for multiple versions of MacOS, as well as Linux on ARM64. Other architectures like Linux 32bits or ARM 32bits are not available. This could be worked out with docker maybe.

Changed the JNI loader to use the same one as in https://github.com/xerial/sqlite-jdbc. It supports more CPU architectures than the current loader, and also handles versioning of the temp file, and cleanup on JVM exit.

Reworked the CMake project to remove the dependency on JNI, which would require to have Java on the build machines, while all that is really needed are the JNI headers.

The cross-compilation of libwebp can be done using https://github.com/dockcross/dockcross for most of the architectures, except for Mac which uses https://github.com/multiarch/crossbuild. I added a bash script to compile all the architectures, which will copy everything in the resources folder after building.

gotson avatar Jul 31 '20 03:07 gotson

Thank you! I'll try to have a look at this as soon as possible.

ediweissmann avatar Jul 31 '20 10:07 ediweissmann

There might be a few things to leave out, I had to change the maven setup to make it work on my machine. I don't have a toolchain installed so I commented that out.

You can try to build the images on your machine by using the compile-all.sh. Hopefully it works on your machine too!

gotson avatar Jul 31 '20 10:07 gotson

Hi @ediweissmann, did you had time to look at this PR by any chance ?

My application has some performance issues with the current plain java webp reader, which would be solved by using your library, but it requires support for more architectures than currently supported.

Let me know if you need some help understanding what i did, or how i did it, or if you require some changes on the way it's integrated.

gotson avatar Aug 24 '20 07:08 gotson

@ediweissmann @pepijnve any updates on getting this merged?

chelming avatar Oct 13 '20 14:10 chelming

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.

Thanks in advance!

lambdaupb avatar Jan 04 '21 16:01 lambdaupb

@gotson

My application has some performance issues with the current plain java webp reader

Is that plain java library open source? I have a edge case use-case and would prefer a plain java lib.

Thanks in advance!

A bit off-topic, but yes, i'm using this: https://sourceforge.net/projects/javavp8decoder/files/imageIO%20Plugin/

gotson avatar Jan 05 '21 00:01 gotson

Hi @gotson

If you have the jar and prebuilt natives for this PR, would you mind uploading them here?

Regards

Ali-RS avatar Jun 01 '21 17:06 Ali-RS

Hi @gotson

If you have the jar and prebuilt natives for this PR, would you mind uploading them here?

Regards

They are available in Maven Central: https://search.maven.org/artifact/com.github.gotson/webp-imageio/0.2.1/jar

gotson avatar Jun 01 '21 23:06 gotson

Thanks :)

Ali-RS avatar Jun 02 '21 04:06 Ali-RS

Hi @gotson, any chance for adding Mac ARM64 architecture?

Ali-RS avatar Dec 10 '21 07:12 Ali-RS

Hi @gotson, any chance for adding Mac ARM64 architecture?

Unlikely. There's no support using Docker to cross compile for that, so the only way to do so is by using a physical Mac, which I don't own.

gotson avatar Dec 10 '21 08:12 gotson

I see, thank you.

Ali-RS avatar Dec 10 '21 08:12 Ali-RS

hi @gotson, thank you so much for your PR and the maven central repository, I was pulling my hair out trying to compile this library for arm64.

Apprisco avatar Jan 08 '22 11:01 Apprisco

Does this PR solve the ARM64 issue?

tuta23 avatar Feb 08 '22 15:02 tuta23

Does this PR solve the ARM64 issue?

For linux only

gotson avatar Feb 09 '22 01:02 gotson

I've opened the PR with the missing MacOS AArch64 binary here - https://github.com/gotson/webp-imageio/pull/1

viakunin avatar May 23 '22 11:05 viakunin