Coder Social home page Coder Social logo

Add support for Windows about splitwebp HOT 7 OPEN

razdeep avatar razdeep commented on July 29, 2024
Add support for Windows

from splitwebp.

Comments (7)

oktak avatar oktak commented on July 29, 2024 3

Hi! I would like to try this. But it is a challenging on Windows. I am using:

Win10 (x64)
VS Community 2017 (15)
Cmake 3.18.3
OpenCV 3.4.11
libwebp-1.1.0-windows-x64.zip  

I can successfully compile (I guess my deliverable for this issue would be a README, loads of un-scriptable steps involved 🙄 ) into a splitwebp.exe. But when I try to passing a webp file to run it, it has no output files, and also shows no error message on the CMD.

I tried these animated webp files:

  1. https://mathiasbynens.be/demo/animated-webp
  2. http://littlesvr.ca/apng/gif_apng_webp2.html
  3. https://ezgif.com/webp-maker/ezgif-6-53fa07a0-webp

So, I started to debug mode. I modified main.cpp and hard code a image path on disk.

It shows an Exception: Access violation reading location. In fact, in current_frame_iter can parse the correct details about the webp file. Only the fragment.bytes and fragment.size property got wrong.
002

I tried all webp files above. Then I tried to edit this line if (WebPDemuxGetFrame(demux, 1, &current_frame_iter)) {
I changed it to if (WebPDemuxGetFrame(demux, 2, &current_frame_iter)) {

Then it no longer popup a Exception, but current_decoded_frame become NULL pointer and it return in line 103.

I did not tried to compile on Linux or Mac. (But I learnt that a user has successfully compiled on Linux in Issue #3 discussion)
To summarize the issues I face, could you help:

  1. Specify the library dependencies version, so that we could follow that,
  2. Offer some animated webp files for testing purpose?

Thanks!

from splitwebp.

Razdeep avatar Razdeep commented on July 29, 2024

Hi! Could you try on this animation?
https://splitwebp.s3-eu-west-1.amazonaws.com/angry.webp

from splitwebp.

Razdeep avatar Razdeep commented on July 29, 2024

@oktak you can add the steps for building in windows in the README

from splitwebp.

oktak avatar oktak commented on July 29, 2024

I've added the steps for building in windows. I put it in a separated file because it is quite long.

I also tried the animation you mentioned. It still give the same Exception: Access violation reading location. I am still figuring out what happens. Is it related to pthread? It seems Windows does not have pthread, so it remove it in the CMakeLists.txt . Please let me know if it is a must.

from splitwebp.

Razdeep avatar Razdeep commented on July 29, 2024

pthread was a dependency on libwebp in Linux.
I was getting an error, without linking it.
It might be possible that missing pthread is causing the problem.
I'm not sure about this. I haven't tried it on windows yet.

from splitwebp.

oktak avatar oktak commented on July 29, 2024

I see. I find that vcpkg which is Microsoft's product to help mange packages for Visual Studio. I find people us it to install pthread for windows and also libwebp.

After some configuration, the Exception: Access violation now goes deeper, it locates at WebP.dll
image

I try to explore on that.

from splitwebp.

oktak avatar oktak commented on July 29, 2024

Thank you for your review on my Pull Request. Sorry for my typo mistakes.

Updates:
I found it is probably the problem of include files of webp (decode.h, demux.h, ...etc).
It looks the the include files are in around version libwebp-0.4.1-windows-x64, but the version I tried before is libwebp-1.1.0-windows-x64

When I set the linker to use the include folder using the one of vcpkg, it can now produce the images of each frame.
(though the filenames are a bit long 😬 Updates: Oh! Just found if I use the "Release" config, it will be start from 1, without leading zeros.)
image

I'll update the README on both your suggestions and adjust the steps on building on Windows.

from splitwebp.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.