Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webp images with animation are not supported #22569

Open
1 of 4 tasks
Polyisoprene opened this issue Sep 20, 2022 · 2 comments
Open
1 of 4 tasks

Webp images with animation are not supported #22569

Polyisoprene opened this issue Sep 20, 2022 · 2 comments

Comments

@Polyisoprene
Copy link

Expected behaviour

Write here how did you expect the library to function.

Actual behaviour

when open a webp with cv2.imread , got a None

Steps to reproduce

  • example code
# If we have downloaded the image from the URL below,and named it 1.webp

# https://i2.hdslb.com/bfs/garb/item/0602d6dc43c5a92610d5cd77b0550802e658ed04.webp 

img = cv2.imread("1.webp")
  • operating system
    Ubuntu 22.04.1 LTS

  • architecture (e.g. x86)
    x86_64

  • opencv-python version
    4.6.0.66

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python
@asmorkalov
Copy link
Contributor

Current webp-opencv integration does not support multi-frame (animated) webp images. In case if you need multi-frame images support you have to convert it to tiff or extract each frame as separate file or convert it to video and use VideoCapture API.

@asmorkalov
Copy link
Contributor

Added assertion to code to report the issue to console. Moved the issue to main OpenCv repo as it's not Python specific.

@asmorkalov asmorkalov transferred this issue from opencv/opencv-python Sep 26, 2022
@asmorkalov asmorkalov changed the title Could not open some webp Webp images with animation are not supported Sep 26, 2022
asmorkalov pushed a commit that referenced this issue Dec 20, 2024
Animated WebP Support #25608

related issues #24855 #22569 

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
RoshniUG pushed a commit to RoshniUG/opencv that referenced this issue Dec 24, 2024
V4l default image size opencv#25500

Added ability to set default image width and height for V4L capture.  This is required for cameras that does not support 640x480 resolution because otherwise V4L capture cannot be opened and failed with "Pixel format of incoming image is unsupported by OpenCV" and then with "can't open camera by index" message. Because of the videoio architecture it is not possible to insert actions between CvCaptureCAM_V4L::CvCaptureCAM_V4L and CvCaptureCAM_V4L::open so the only way I found is to use environment variables to preselect the resolution.

Related bug report is [opencv#25499](opencv#25499)
Maybe (but not confirmed) this is also related to [opencv#24551](opencv#24551)

This fix was made and verified in my local environment: capture board AVMATRIX VC42, Ubuntu 20, NVidia Jetson Orin.

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [X] I agree to contribute to the project under Apache 2 License.
- [X] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [X] The PR is proposed to the proper branch
- [X] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake

Merge pull request opencv#25608 from sturkmen72:animated_webp_support

Animated WebP Support opencv#25608

related issues opencv#24855 opencv#22569

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants