| Summary: | Issue with loading WEBP images with RWops | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Sylvain <sylvain.becker> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
test case
a webp image |
||
Created attachment 2563 [details]
a webp image
Fixed, thanks! https://hg.libsdl.org/SDL_image/rev/4491ac456363 That was a really good test case. :) |
Created attachment 2562 [details] test case Some user reported an issue when loading a WEBP image from RWOPS stream. Here's a test case in attachment. Some fix in "IMG_webp.c" file: remove: 209 // seek to start of file 210 SDL_RWseek(src, 0, RW_SEEK_SET ); 211 replace: 162 if ( datasize ) { 163 *datasize = (int)SDL_RWseek(src, 0, SEEK_END); 164 } by: 162 if ( datasize ) { 163 *datasize = (int)SDL_RWseek(src, 0, SEEK_END) - start; 164 } Fix is partial because it won't work if multiple files are concatenated in the stream (One needs to modify "webp_getinfo" to get correctly the size).