blob: 89a28f65e425cb9a9e97f4327ae91145b5705979 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* $Id: w3mimgsize.c,v 1.1 2002/01/31 17:54:57 ukai Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <Imlib.h>
int
main(int argc, char **argv)
{
Display *display;
ImlibData *id;
ImlibImage *im;
fclose(stderr);
if (argc < 2)
exit(1);
display = XOpenDisplay(NULL);
if (!display)
exit(1);
id = Imlib_init(display);
if (!id)
exit(1);
im = Imlib_load_image(id, argv[1]);
if (!im)
exit(1);
printf("%d %d\n", im->rgb_width, im->rgb_height);
/*
* Imlib_kill_image(id, im);
* XCloseDisplay(display);
*/
exit(0);
}
|