From 7d310e4897887909099afa1cb9333dd85eae3bd4 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Sun, 26 Nov 2017 13:43:05 +0000 Subject: Use imv_bitmap for bitmaps intead of FIBITMAP --- src/imv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/imv.c') diff --git a/src/imv.c b/src/imv.c index ef03fb8..642a060 100644 --- a/src/imv.c +++ b/src/imv.c @@ -644,11 +644,11 @@ static void handle_event(struct imv *imv, SDL_Event *event) if(event->type == imv->events.NEW_IMAGE) { /* new image to display */ - FIBITMAP *bmp = event->user.data1; + struct imv_bitmap *bmp = event->user.data1; imv_image_set_bitmap(imv->image, bmp); - imv->current_image.width = FreeImage_GetWidth(bmp); - imv->current_image.height = FreeImage_GetHeight(bmp); - FreeImage_Unload(bmp); + imv->current_image.width = bmp->width; + imv->current_image.height = bmp->height; + imv_bitmap_free(bmp); imv->need_redraw = true; imv->need_rescale |= event->user.code; return; -- cgit v1.2.3