Re: General questions about using PIL in a Py2exe project
"Werner F. Bruhin" <[email protected]>
| Newsgroups | gmane.comp.python.py2exe,gmane.comp.python.image |
|---|---|
| Message-ID | <[email protected]> |
Hi Malcolm, On 25/10/2010 18:33, [email protected] wrote: > We're thinking about using PIL (Python Imaging Library) in a project. > Before we start down this path, I'm wondering if anyone can give me a > rough estimate how much disk space the PIL package adds to a > distribution and how difficult is it to distribute PIL as part of py2exe > project? > Background: We're using Python 2.7 32-bit for Windows). We're very > familiar with py2exe. We are new to the PIL library. I use it for some time with Py 2.5 and Py 2.6 on Windows, haven't moved to Py 2.7 yet. Do not recall any problems when using it in relation to py2exe. I use the "zipfile" option in py2exe, so the additional size is about 500kb un-compressed with my usage(i.e. what I see in in zipfile/pil, see below for the "import's" I use). Looking at PIL in site-packages this could go up to about 1.6 Mb. In the setup.py I don't do anything special but in my code using PIL I have the following lines: import PIL.Image as Image import PIL.PngImagePlugin import PIL.GifImagePlugin import PIL.JpegImagePlugin import PIL.BmpImagePlugin Image._initialized=2 See also here: http://www.py2exe.org/index.cgi/py2exeAndPIL Hope this helps Werner ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev