diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-26 14:26:03 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-26 15:45:00 +0000 |
commit | 60b12cd9fe2b543aca4359ff0ba3f27ad27ae6ce (patch) | |
tree | ee013e44d879abd02c0de6cf8c588ab778044a1d /content/handlers/image | |
parent | e7a355bf8dafc4bb0b0b6c9d85dcef4b21ae5fe0 (diff) | |
download | netsurf-60b12cd9fe2b543aca4359ff0ba3f27ad27ae6ce.tar.gz netsurf-60b12cd9fe2b543aca4359ff0ba3f27ad27ae6ce.tar.bz2 |
Image: ICO: Call bitmap format conversion after decode.
Currently a no-op, because we decode to the default format
and no front end requests anything but the default format.
Diffstat (limited to 'content/handlers/image')
-rw-r--r-- | content/handlers/image/ico.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/handlers/image/ico.c b/content/handlers/image/ico.c index ac617f79e..6f3e67e8b 100644 --- a/content/handlers/image/ico.c +++ b/content/handlers/image/ico.c @@ -34,6 +34,7 @@ #include "content/content_protected.h" #include "content/content_factory.h" #include "desktop/gui_internal.h" +#include "desktop/bitmap.h" #include "image/image.h" #include "image/ico.h" @@ -193,6 +194,9 @@ static bool nsico_redraw(struct content *c, struct content_redraw_data *data, return false; } else { NSLOG(netsurf, INFO, "Decoding bitmap"); + bitmap_format_to_client(bmp->bitmap, &(bitmap_fmt_t) { + .layout = BITMAP_LAYOUT_R8G8B8A8, + }); guit->bitmap->modified(bmp->bitmap); } @@ -263,6 +267,9 @@ static void *nsico_get_internal(const struct content *c, void *context) if (bmp_decode(bmp) != BMP_OK) { return NULL; } else { + bitmap_format_to_client(bmp->bitmap, &(bitmap_fmt_t) { + .layout = BITMAP_LAYOUT_R8G8B8A8, + }); guit->bitmap->modified(bmp->bitmap); } } @@ -296,6 +303,9 @@ static bool nsico_is_opaque(struct content *c) return false; } + bitmap_format_to_client(bmp->bitmap, &(bitmap_fmt_t) { + .layout = BITMAP_LAYOUT_R8G8B8A8, + }); guit->bitmap->modified(bmp->bitmap); } |