Support WebP Animate Format Imaeg Files.
To support webp animation, apply webp animation decoder.
Details
- compile src/exmaple/elementary/image_webp_example_01.c and 02.c
- run the samples
Diff Detail
- Repository
- rEFL core/efl
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/modules/evas/image_loaders/webp/evas_image_load_webp.c | ||
---|---|---|
13 | What is this Frame_Info for? | |
32 | Why do't you use same style for typedef? | |
113–138 | Please remove EINA_UNUSED | |
163 | Please free memory of frame before return here. | |
168 | Would you please add some comments why we need to use 0.1? What is the meaning of 0.1? | |
179 | :-p | |
193 | *error = ?; | |
200 | *error = ?; | |
208 | Please remove empty line. |
Please check comments.
src/examples/elementary/image_webp_example_01.c | ||
---|---|---|
2 | You missed adding this examples in meson.build. | |
src/lib/evas/meson.build | ||
13 | webp = dependency('libwebpdemux', required: get_option('evas-loaders-disabler').contains('webp') == false) | |
src/modules/evas/image_loaders/webp/evas_image_load_webp.c | ||
18 | Does File_Info struct necessary? I think you can put the void* map into Loader_Info | |
144 | EINA_LIST_FREE()? | |
161 | looks unnecessary. | |
177 | Always animated?? | |
190 | q) what case frame->dealy == 0.0? and where DEFAULT_DURATION value come from? | |
204 | I think you can use eina_array so that you can find the frame in O(1) | |
212 | This is not good for loading time.... |
Please check one more comment.
src/modules/evas/image_loaders/webp/evas_image_load_webp.c | ||
---|---|---|
109 | When we get frame_count, we can reserve array with the size in advance. |
I think this module also consider to flush the stored frame images to retain the spare memory , Please check a gif loader - flush_older_frames(), how it does.
src/modules/evas/image_loaders/webp/evas_image_load_webp.c | ||
---|---|---|
223 | Why don't you check return value of this WebPAnimDecoderGetNext? |
Add checking return value for getting next frame
buf owner is dec, so we don't need to free for buf
// ... (Do NOT free 'buf', as it is owned by 'dec').
Only this one thing :)
src/lib/evas/meson.build | ||
---|---|---|
10–11 | This line can go, as we overwrite the result anyways. |
I think there should be libwebp version check, because you will get compilation errors on ubuntu 16.04 when libwebp in installed using apt install