diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-11-01 16:29:38 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-11-01 16:29:38 +0100 |
| commit | d40bb519ef34f20b30762cf5d32f0078b960c706 (patch) | |
| tree | 28e23a67e2340ba28036731c74e5555115c54bae | |
| parent | 263fdaa4366782d38c7546b97f79bd76419913f8 (diff) | |
| download | bgdraw-d40bb519ef34f20b30762cf5d32f0078b960c706.tar.gz bgdraw-d40bb519ef34f20b30762cf5d32f0078b960c706.zip | |
Fix default width and height assignment for gif
| -rw-r--r-- | bgdraw.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -261,6 +261,11 @@ load_img(struct image *img) if (!frames || !img->framecnt) errx(1, "IMG %s: Failed to load gif image", img->name); + if (!img->w || !img->h) { + img->w = width; + img->h = height; + } + img->frames = malloc(sizeof(XImage*) * img->framecnt); if (!img->frames) err(1, "malloc"); |
