[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] rc3 for Windows doesn't recogize PNG, JPEG and TIFF files
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] rc3 for Windows doesn't recogize PNG, JPEG and TIFF files
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Sat, 18 Aug 2007 12:24:31 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 17 Aug 2007 22:24:42 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=cIZ7EObC+WH0UOV8beV4wrUHeRX/0cmUbbemtNAOUdAGarv24CLR1W8+Pfmfq1VR9XqKMLL1k5mg/et+cTcgi0HtnfPaADsqO0vKtvQ21cd1NXstGyAzjpAd7uu3WBMTN2/38MRBh8ldL6cknnRDOAOoMTcpAzzNFvQLAhKUVaQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HD60tkiMsTeEyTyCT+GFzcM0KVMUq0RW6mVg1vkt08pkVL1JKaZAR9lxh2dsNus7lqBpBhzXa+hnE/nMxlPQwSvajN4Ior8TljGPPmIb89JSY9ejiFyYUzXjyrDby9UHRALZ9HMb/Y5ik19SYki3rhuXVPlH1i3IJW56D2eR09M=
- In-reply-to: <46C63922.3000903@xxxxxxxxx>
- References: <46C63922.3000903@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Thanks.
I've updated the wiki page with these instructions.
http://www.pygame.org/wiki/MingW
On 8/18/07, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
>
> The rc3 binaries for Python 2.5 on Windows will not read PNG, JPEG, or
> TIFF files.
>
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pygame
> >>> pygame.init()
> (6, 0)
> >>> im = pygame.image.load("testimg.jpg")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> pygame.error: Failed loading jpeg.dll: One of the library files needed
> to run th
> is application cannot be found.
>
> >>>
>
> For PNG and TIFF files it just gives an unsupported format message.
>
> Looking at SDL_image.dll I see it has no dependencies for libtiff.dll,
> libpng13.dll or jpeg.dll . I also notice that libtiff.dll is linked to
> libjpeg.dll, a nonexistent file (I had this problem too).
>
> This is what apparently happened. By default SDL_image is compiled to
> dynamically load the support libraries. ./configure will only do this if
> it finds the dll. It will look in /usr/local/lib for example. It found
> jpeg.dll. It could not find the dlls, nor the import libraries, for
> libtiff and libpng13, so disabled support for them. Now in doing a
> search for a dynamic library the directory in which SDL_image.dll
> resides is *not* searched automatically. Therefore the jpeg.dll in the
> pygame package may be ignored. In my case no jpeg.dll existed anywhere
> else in the dll search path so the jpeg image load failed.
>
> I suggest forgoing dynamic loading and just link against the import
> libraries for jpeg.dll, libpng13 and libtiff.dll instead. The
> --disable-jpg-shared, --disable-png-shared and --disable-tif-shared
> options to ./configure do this. Now the pygame package directory is
> searched first, and the correct versions of jpeg.dll, etc, are found.
> This is how the SDL_image.dll I compiled works.
>
> --
> Lenard Lindstrom
> <len-l@xxxxxxxxx>
>
>