aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-25 12:08:12 +0100
committerBert <ber.t@gmx.com>2011-02-25 12:08:12 +0100
commitdafe7eac742301952c088d68a455586b0225a7bd (patch)
tree3a457e0cbd21e274f05df47162504363941c7272 /thumbs.c
parent62fb69b3287addfc5f28db1117b2e314b68e761c (diff)
downloadnsxiv-dafe7eac742301952c088d68a455586b0225a7bd.tar.zst
Refactored imlib context handling
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/thumbs.c b/thumbs.c
index 89f48ff..e60bdc7 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -79,10 +79,13 @@ void tns_load(tns_t *tns, win_t *win, const char *filename) {
t->pm = win_create_pixmap(win, t->w, t->h);
imlib_context_set_drawable(t->pm);
+ imlib_context_set_anti_alias(1);
imlib_render_image_part_on_drawable_at_size(0, 0, w, h,
0, 0, t->w, t->h);
- imlib_free_image();
tns->dirty = 1;
+
+ if (im)
+ imlib_free_image();
}
void tns_check_view(tns_t *tns, Bool scrolled) {