diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-22 16:17:32 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-22 16:17:32 +0000 |
commit | 9f103b13bb3c46be9a9e017547c193f75876e24e (patch) | |
tree | 73c933927f290d578e4fc672605111319a5985cb /w3mimg/x11 | |
parent | [w3m-dev 03278] Compile error on mipsel linux (glibc-2.0.6) (diff) | |
download | w3m-9f103b13bb3c46be9a9e017547c193f75876e24e.tar.gz w3m-9f103b13bb3c46be9a9e017547c193f75876e24e.zip |
[w3m-dev 03279] w3m-img for framebuffer update
http://homepage3.nifty.com/slokar/fb/w3mfb.patch.gz
* w3mimg/fb/readme.txt: update
* w3mimg/fb/fb.c: update
* w3mimg/fb/fb.h: update
* w3mimg/fb/fb_gdkpixbuf.c: update
* w3mimg/fb/fb_img.c: update
* w3mimg/fb/fb_img.h: update
* w3mimg/fb/fb_imlib2.c: update
* w3mimg/fb/fb_w3mimg.c: update
* w3mimg/fb/fb_gdkpixbuf.h: deleted
* w3mimg/fb/fb_imlib2.h: deleted
* w3mimg/w3mimg.h (w3mimg_op): add get_image_size()
* w3mimg/x11/x11_w3mimg.c: update
* w3mimgdisplay.c (main): use get_image_size()
* w3mimgsize.c (main): use get_image_size()
From: Hiroyuki Ito <hito@crl.go.jp>
Diffstat (limited to 'w3mimg/x11')
-rw-r--r-- | w3mimg/x11/x11_w3mimg.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/w3mimg/x11/x11_w3mimg.c b/w3mimg/x11/x11_w3mimg.c index 9e8c601..b4fe867 100644 --- a/w3mimg/x11/x11_w3mimg.c +++ b/w3mimg/x11/x11_w3mimg.c @@ -1,4 +1,4 @@ -/* $Id: x11_w3mimg.c,v 1.4 2002/07/18 15:15:32 ukai Exp $ */ +/* $Id: x11_w3mimg.c,v 1.5 2002/07/22 16:17:32 ukai Exp $ */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -194,6 +194,27 @@ x11_free_image(w3mimg_op * self, W3MImage * img) } } +static int +x11_get_image_size(w3mimg_op * self, W3MImage * img, char *fname, int *w, int *h) +{ + struct x11_info *xi; + ImlibImage *im; + + if (self == NULL) + return 0; + xi = (struct x11_info *)self->priv; + if (xi == NULL) + return 0; + + im = Imlib_load_image(xi->id, fname); + if (!im) + return 0; + + *w = im->rgb_width; + *h = im->rgb_height; + Imlib_kill_image(xi->id, im); + return 1; +} /* *INDENT-OFF* */ /* @@ -319,6 +340,7 @@ w3mimg_x11open() wop->load_image = x11_load_image; wop->show_image = x11_show_image; wop->free_image = x11_free_image; + wop->get_image_size = x11_get_image_size; return wop; error: |