1 /* -*- c -*- */
2 
3 /*
4  * imagesize.c
5  *
6  * metapixel
7  *
8  * Copyright (C) 2003 Mark Probst
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  */
24 
25 #include <stdio.h>
26 #include <assert.h>
27 
28 #include "readimage.h"
29 
30 int
main(int argc,char * argv[])31 main (int argc, char *argv[])
32 {
33     image_reader_t *reader;
34 
35     assert(argc == 2);
36 
37     reader = open_image_reading(argv[1]);
38 
39     if (reader == 0)
40 	printf("0 0\n");
41     else
42 	printf("%d %d\n", reader->width, reader->height);
43 
44     return 0;
45 }
46