godotengine / godotengine/godot

Some Lossless WebP files can not be decoded and therefore used

Open
#116,384 4 comments 0 reactions 0 assignees View on GitHub
bug needs testing topic:import
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducable in Godot 4.6.1

### System information

Godot v4.6.1.stable - Windows 11 (build 26100) - Multi-window, 4 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 6900 XT (Advanced Micro Devices, Inc.; 32.0.21041.1000) - AMD Ryzen 9 5900X 12-Core Processor (24 threads) - 31.92 GiB memory

### Issue description

Some WebP Images do not work in Godot. There is always this error:
```
ERROR: Failed decoding WebP image.
ERROR: core/io/image_loader.cpp:100 - Error loading image: 'res://background.webp'.
ERROR: Error importing 'res://background.webp'.
```

All of the issues are created with Aseprite 1.3.16.1.

What I found out so far:
- They all works with Chromium, Aseprite and on Windows Image Viewer
- If a high compression level does not work, then most of the lower ones work. Sometimes 0 compression level does not work, while e.g. 1 works.
- It seems that bigger images with non pixel art suffer from this. But not all of them

### Steps to reproduce

- Open the attached project, in there are images that do not work
- Some images work with another compression levels, which I added as well

### Minimal reproduction project (MRP)

[webp-decoder.zip](https://github.com/user-attachments/files/25351612/webp-decoder.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached webp-decoder.zip minimal reproduction project and the error location in core/io/image_loader.cpp:100. Compare the failing and working WebP files and verify that the affected images import and decode successfully without the reported errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.