showimage.c
changeset 187 3405ab551300
parent 186 5fbbeabf647f
child 204 dcb38b0e78a6
     1.1 --- a/showimage.c	Mon Dec 08 00:27:32 2008 +0000
     1.2 +++ b/showimage.c	Sun Jan 04 02:09:27 2009 +0000
     1.3 @@ -80,6 +80,7 @@
     1.4  	SDL_Surface *screen, *image;
     1.5  	int i, depth, done;
     1.6  	SDL_Event event;
     1.7 +	SDL_RWops* rw_ops;
     1.8  
     1.9  	/* Check command line usage */
    1.10  	if ( ! argv[1] ) {
    1.11 @@ -100,6 +101,18 @@
    1.12  			flags |= SDL_FULLSCREEN;
    1.13  			continue;
    1.14  		}
    1.15 +#if 0
    1.16 +		rw_ops = SDL_RWFromFile(argv[1], "r");
    1.17 +		
    1.18 +		fprintf(stderr, "BMP:\t%d\n", IMG_isBMP(rw_ops));
    1.19 +		fprintf(stderr, "GIF:\t%d\n", IMG_isGIF(rw_ops));
    1.20 +		fprintf(stderr, "JPG:\t%d\n", IMG_isJPG(rw_ops));
    1.21 +		fprintf(stderr, "PNG:\t%d\n", IMG_isPNG(rw_ops));
    1.22 +		fprintf(stderr, "TIF:\t%d\n", IMG_isTIF(rw_ops));
    1.23 +		/* fprintf(stderr, "TGA:\t%d\n", IMG_isTGA(rw_ops)); */
    1.24 +		fprintf(stderr, "PCX:\t%d\n", IMG_isPCX(rw_ops));
    1.25 +#endif
    1.26 +
    1.27  		/* Open the image file */
    1.28  #ifdef XPM_INCLUDED
    1.29  		image = IMG_ReadXPMFromArray(picture_xpm);