diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-24 15:45:55 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-03-24 15:45:55 +0000 |
commit | b8b37f87278897ddd867505b93b72883f99f2148 (patch) | |
tree | 79db04ceadecaedad015291e49dc8ce784b79ff2 /w3mimg/fb/fb_gdkpixbuf.c | |
parent | [w3m-dev 03828] possible typo in nextA (diff) | |
download | w3m-b8b37f87278897ddd867505b93b72883f99f2148.tar.gz w3m-b8b37f87278897ddd867505b93b72883f99f2148.zip |
[w3m-dev 03829] w3mimgdisplay -anim
* w3mimgdisplay.c (maxAnim): added, default 100
(main): add --anim option, w_op->max_anim
* w3mimg/w3mimg.h (w3mimg_op): add max_anim
* w3mimg/fb/fb_gdkpixbuf.c (fb_image_load): add max_anim
* w3mimg/fb/fb_img.h (fb_image_load): add max_anim args
* w3mimg/fb/fb_imlib2.c (fb_image_load): add max_anim args
* w3mimg/fb/fb_w3mimg.c (w3mfb_load_image): pass max_anim
* w3mimg/x11/x11_w3mimg.c (x11_load_image): max_anim
From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to 'w3mimg/fb/fb_gdkpixbuf.c')
-rw-r--r-- | w3mimg/fb/fb_gdkpixbuf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/w3mimg/fb/fb_gdkpixbuf.c b/w3mimg/fb/fb_gdkpixbuf.c index 45fabd7..e0c1775 100644 --- a/w3mimg/fb/fb_gdkpixbuf.c +++ b/w3mimg/fb/fb_gdkpixbuf.c @@ -1,4 +1,4 @@ -/* $Id: fb_gdkpixbuf.c,v 1.8 2002/09/09 14:00:18 ukai Exp $ */ +/* $Id: fb_gdkpixbuf.c,v 1.9 2003/03/24 15:45:59 ukai Exp $ */ /************************************************************************** fb_gdkpixbuf.c 0.3 Copyright (C) 2002, hito **************************************************************************/ @@ -27,7 +27,7 @@ get_image_size(char *filename, int *w, int *h) } FB_IMAGE ** -fb_image_load(char *filename, int w, int h) +fb_image_load(char *filename, int w, int h, int max_anim) { GdkPixbufAnimation *animation; GList *frames; @@ -44,6 +44,9 @@ fb_image_load(char *filename, int w, int h) fw = gdk_pixbuf_animation_get_width(animation); fh = gdk_pixbuf_animation_get_height(animation); n = gdk_pixbuf_animation_get_num_frames(animation); + if (max_anim > 0) { + n = (max_anim > n)? n : max_anim; + } if (w < 1 || h < 1) { w = fw; h = fh; |