Image: BMP: Update for new libnsbmp API.

This commit is contained in:
Michael Drake 2022-03-24 12:01:36 +00:00
parent 1dd3c80d9b
commit b6238c6c5c

View File

@ -74,7 +74,6 @@ static nserror nsbmp_create_bmp_data(nsbmp_content *bmp)
.bitmap_create = nsbmp_bitmap_create, .bitmap_create = nsbmp_bitmap_create,
.bitmap_destroy = guit->bitmap->destroy, .bitmap_destroy = guit->bitmap->destroy,
.bitmap_get_buffer = guit->bitmap->get_buffer, .bitmap_get_buffer = guit->bitmap->get_buffer,
.bitmap_get_bpp = guit->bitmap->get_bpp
}; };
bmp->bmp = calloc(sizeof(struct bmp_image), 1); 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 */ /* Store our content width and description */
c->width = bmp->bmp->width; c->width = bmp->bmp->width;
c->height = bmp->bmp->height; c->height = bmp->bmp->height;
swidth = bmp->bmp->bitmap_callbacks.bitmap_get_bpp(bmp->bmp->bitmap) * swidth = sizeof(uint32_t) * bmp->bmp->width;
bmp->bmp->width;
c->size += (swidth * bmp->bmp->height) + 16 + 44; c->size += (swidth * bmp->bmp->height) + 16 + 44;
/* set title text */ /* set title text */