Using Webp in Java or Converting Raw bytes

720 views
Skip to first unread message

Chestly

unread,
Oct 20, 2020, 9:31:00 PM10/20/20
to WebP Discussion
Hey, Im a Java dev, Am currently working on a project that will require Small and lossless images on the web. I of course wanted to use WebP but couldnt find any API to convert a Regular Png or Jpeg image to Webp.

I also didnt see a way to convert a raw byte array or String to a webp from the command line, Which i could have possibly utilized. Is there some FrameWork for doing this already written in Java, Or is there another way to convert strings or byte arrays to the webp format, I really do not want to have to create a new file anytime i have to convert, then call a command line command and then get the contents of that image!

Thanks for the help! 

James Zern

unread,
Oct 26, 2020, 2:50:01 PM10/26/20
to WebP Discussion
Hi,

On Tue, Oct 20, 2020 at 6:31 PM Chestly <chestly.q...@gmail.com> wrote:
Hey, Im a Java dev, Am currently working on a project that will require Small and lossless images on the web. I of course wanted to use WebP but couldnt find any API to convert a Regular Png or Jpeg image to Webp.

I also didnt see a way to convert a raw byte array or String to a webp from the command line, Which i could have possibly utilized. Is there some FrameWork for doing this already written in Java, Or is there another way to convert strings or byte arrays to the webp format, I really do not want to have to create a new file anytime i have to convert, then call a command line command and then get the contents of that image!

This has come up a few times in the past, there are a few options. We have a simple SWIG based wrapper for the simple API [1]. There's also a java imageio wrapper [2]. The original bitbucket repo link seems to have gone bad on that one.
Let me know if either of those will work for your use case.

 

Thanks for the help! 

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/8a982c6b-9fad-4e15-a254-59953f9ab7bbn%40webmproject.org.
Reply all
Reply to author
Forward
0 new messages