SDL2 problems with webp animated images works with gifs but not with webp

315 Views Asked by At

im trying to play animated image to SDL2, my code works with animated gifs and static, if i add a static webp image works fine to, but if i add an animated webp, console gives me message fail to decode. I get the SDL2 last release with libwebp-7.dll, then i compiled webp to get libs and dlls libwebpdecoder.dll/lib and libwebpdemux.dll/lib, i dont know if i have wrong name of dlls as i get libwebp.dll and sdl_image release has libwebp-7.dll.

I´m using VS2019, i try compile using website example and vs2019 console.

i dont know if is need compile sdl_image with external options, and if so dont know how compile it to add webp/extra (folder with sdl code files) on windows.

#include <SDL.h> 
#include <SDL_image.h>
#include<iostream>
#include <decode.h>
#include <demux.h>
#include "SDL_endian.h"

SDL_Window* window;
SDL_Renderer* renderer;
IMG_Animation* anim;
SDL_Texture** textures;

//anim = IMG_LoadAnimation("logo.gif");  // works for animated gif our static
anim = IMG_LoadAnimation("anim.webp"); // works for static but for 

CONSOLE MESSAGE : Couldn't load Failed to decode WEBP: �w♥☺

0

There are 0 best solutions below