1

I want to convert gif to webp file in my react native app to send it to other app for further process. After trying many ways I found that this gif2webp command line can do the job and I can convert the gif to webp using cmd in windwos but do not have idea how to integrate it with react native.

tool:https://developers.google.com/speed/webp/docs/gif2webp

If I want to use it with Java files in react native or other rn modules then how to use it? I tried with Process builder but it says could not find the gif2webp.

I searched for RN modules but could not found any. It will be great help if you can suggest anything.

CrackerKSR
  • 1,380
  • 1
  • 11
  • 29
  • In fact, you can't run a command line in `react-native`. I don't know what help you are looking for. – Yaman KATBY Jan 27 '22 at 10:31
  • I am looking for the way to use it with java. I can create new RN module or use with other installed RN module which I use for image manipulation. I just need to execute the single line command programmatically. – CrackerKSR Jan 27 '22 at 10:40
  • No way, this is JavaScript code that you can't run on Android or iOS. I think you have to find another tool. – Yaman KATBY Jan 27 '22 at 10:43
  • The RN also uses JAVA / Kotlin behind the scene. The React Native Bridge. I tried imagemagick android library in java to build a RN module which can be used in React Native apps. – CrackerKSR Aug 23 '22 at 15:11

2 Answers2

1

Check this out. It contains similar tools https://github.com/tanersener/mobile-ffmpeg

0

use ffmpeg react native package. It contains libwebp which would do the job

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 29 '22 at 11:16