aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-14 18:35:25 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-14 18:35:25 +0000
commit5abc07fd2ecb18b90975d171a2af30f2d70053de (patch)
tree74b739c1c17deb9ab7f9e5cc10f67a92f99533ed /src
parent98ac48de35c792b03a318a1ff35c20c5d38d5337 (diff)
downloadimv-5abc07fd2ecb18b90975d171a2af30f2d70053de.tar.gz
Don't use FreeImage_EnlargeCanvas
It's a relatively new feature in FreeImage and easily avoided. Not using it will fix the build on Fedora 22. Fixes #9
Diffstat (limited to 'src')
-rw-r--r--src/image.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/image.c b/src/image.c
index cd59372..db07981 100644
--- a/src/image.c
+++ b/src/image.c
@@ -160,13 +160,9 @@ void imv_image_load_next_frame(struct imv_image *img)
if(img->width != (int)FreeImage_GetWidth(frame32) ||
img->height != (int)FreeImage_GetHeight(frame32)) {
RGBQUAD color = {0,0,0,0};
- FIBITMAP *expanded = FreeImage_EnlargeCanvas(frame32,
- left,
- top,
- img->width - FreeImage_GetWidth(frame32) - left,
- img->height - FreeImage_GetHeight(frame32) - top,
- &color,
- 0);
+ FIBITMAP *expanded = FreeImage_AllocateEx(img->width, img->height, 32,
+ &color, 0, NULL, 0, 0, 0);
+ FreeImage_Paste(expanded, frame32, left, top, 255);
FreeImage_Unload(frame32);
frame32 = expanded;
}