aboutsummaryrefslogtreecommitdiffstats
path: root/w3mimg/fb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--w3mimg/fb/fb_gdkpixbuf.c7
-rw-r--r--w3mimg/fb/fb_img.h4
-rw-r--r--w3mimg/fb/fb_imlib2.c4
-rw-r--r--w3mimg/fb/fb_w3mimg.c4
4 files changed, 11 insertions, 8 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;
diff --git a/w3mimg/fb/fb_img.h b/w3mimg/fb/fb_img.h
index 2e64717..f607bde 100644
--- a/w3mimg/fb/fb_img.h
+++ b/w3mimg/fb/fb_img.h
@@ -1,9 +1,9 @@
-/* $Id: fb_img.h,v 1.6 2002/10/10 16:16:04 ukai Exp $ */
+/* $Id: fb_img.h,v 1.7 2003/03/24 15:45:59 ukai Exp $ */
#ifndef fb_img_header
#define fb_img_header
#include "fb.h"
-FB_IMAGE **fb_image_load(char *filename, int w, int h);
+FB_IMAGE **fb_image_load(char *filename, int w, int h, int n);
void fb_image_set_bg(int r, int g, int b);
int get_image_size(char *filename, int *w, int *h);
diff --git a/w3mimg/fb/fb_imlib2.c b/w3mimg/fb/fb_imlib2.c
index 49a17a5..972f06e 100644
--- a/w3mimg/fb/fb_imlib2.c
+++ b/w3mimg/fb/fb_imlib2.c
@@ -1,4 +1,4 @@
-/* $Id: fb_imlib2.c,v 1.8 2002/09/09 14:00:42 ukai Exp $ */
+/* $Id: fb_imlib2.c,v 1.9 2003/03/24 15:45:59 ukai Exp $ */
/**************************************************************************
fb_imlib2.c 0.3 Copyright (C) 2002, hito
**************************************************************************/
@@ -32,7 +32,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 n)
{
Imlib_Image image;
FB_IMAGE **frame;
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c
index e7cb1eb..bac9dcc 100644
--- a/w3mimg/fb/fb_w3mimg.c
+++ b/w3mimg/fb/fb_w3mimg.c
@@ -1,4 +1,4 @@
-/* $Id: fb_w3mimg.c,v 1.8 2002/12/25 16:18:19 ukai Exp $ */
+/* $Id: fb_w3mimg.c,v 1.9 2003/03/24 15:46:00 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -67,7 +67,7 @@ w3mfb_load_image(w3mimg_op * self, W3MImage * img, char *fname, int w, int h)
if (self == NULL)
return 0;
- im = fb_image_load(fname, w, h);
+ im = fb_image_load(fname, w, h, self->max_anim);
if (!im)
return 0;
img->pixmap = im;