[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Error handling non Windows BMP images



On Sat, 2002-02-16 at 07:45, Pete Shinners wrote:

> >     sprite = pygame.image.load(sprite_file)
> > pygame.error: File is not a Windows BMP file
> 
> here's what is going on. you can build the pygame.image module with or 
> without the SDL_image library. when you don't use SDL_image, you only 
> get support for loading BMP images. this is definitely the problem here, 
>   not finding the SDL_image support.
> 
> you can test if pygame.image has the SDL_image support by calling 
> pygame.image.get_extended(), which will return a nonzero value if you 
> can load more then just BMP.
> 
> 
> this should get you up and running. do let me know if otherwise :]


	otherwise! (c:


	I did get a 0 back, so apparently SDL image support didn't get added in
during the build process. Only problem is, that the Setup file seems to
indicate that it should have.

First of all:

[root@odyssey root]# rpm -q -a | grep -i dist
Distutils-1.0.2-2

[root@odyssey root]# rpm -q -a | grep -i sdl
libSDL_ttf1.2-1.2.2-3mdk
SDL-devel-1.2.2-3
SDL_image-1.2.0-3
SDL-1.2.2-3
SDL_image-devel-1.2.1-1
SDL_net-1.2.2-1
SDL_mixer-1.2.0-4

	all looks good to me.

From the Build file:

EXTRABASE =
SDL = -I/usr/include/SDL -L/usr/lib -I/usr/include/SDL -D_REENTRANT -L/usr/lib $FONT = -lSDL_ttf
IMAGE = -lSDL_image
MIXER = -lSDL_mixer
SMPEG = -lsmpeg

(...)

imageext src/imageext.c $(SDL) $(IMAGE)

(...)

image src/image.c $(SDL)


and it looks to me like the SDL_image.h is in fact located in /usr/include/SDL




	Any ideas why it's not getting picked up by the compiler?


(thanks again for all of the help!)

-Steve Castellotti
 http://cogengine.sourceforge.net/

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org