From b6238c6c5c82322b94943ffa446f1c1bf77fcea3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 24 Mar 2022 12:01:36 +0000 Subject: [PATCH] Image: BMP: Update for new libnsbmp API. --- content/handlers/image/bmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/handlers/image/bmp.c b/content/handlers/image/bmp.c index a723022fe..6ef4aacdf 100644 --- a/content/handlers/image/bmp.c +++ b/content/handlers/image/bmp.c @@ -74,7 +74,6 @@ static nserror nsbmp_create_bmp_data(nsbmp_content *bmp) .bitmap_create = nsbmp_bitmap_create, .bitmap_destroy = guit->bitmap->destroy, .bitmap_get_buffer = guit->bitmap->get_buffer, - .bitmap_get_bpp = guit->bitmap->get_bpp }; bmp->bmp = calloc(sizeof(struct bmp_image), 1); @@ -151,8 +150,7 @@ static bool nsbmp_convert(struct content *c) /* Store our content width and description */ c->width = bmp->bmp->width; c->height = bmp->bmp->height; - swidth = bmp->bmp->bitmap_callbacks.bitmap_get_bpp(bmp->bmp->bitmap) * - bmp->bmp->width; + swidth = sizeof(uint32_t) * bmp->bmp->width; c->size += (swidth * bmp->bmp->height) + 16 + 44; /* set title text */