home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pypil112.zip / README.PIL < prev   
Text File  |  2001-05-04  |  10KB  |  292 lines

  1.  
  2. The Python Imaging Library
  3. $Id: README$
  4.  
  5. Release 1.1.2 (May 7, 2001)
  6.  
  7. ====================================================================
  8. The Python Imaging Library 1.1.2
  9. ====================================================================
  10.  
  11. Contents
  12. --------
  13.  
  14. + Introduction
  15. + Support Options
  16. + News Highlights
  17. + Software License
  18. + Build instructions for UNIX
  19. + Build instructions for Windows
  20.  
  21. --------------------------------------------------------------------
  22. Introduction
  23. --------------------------------------------------------------------
  24.  
  25. The Python Imaging Library (PIL) adds image processing capabilities to
  26. your Python environment.  This library provides extensive file format
  27. support, an efficient internal representation, and fairly powerful
  28. image processing capabilities.
  29.  
  30. This source kit has been built and tested on Windows 95, 98 and NT,
  31. and a number of Unix platforms (including Alpha, Solaris, and Intel
  32. systems).  We believe that it should work on most modern platforms
  33. (people are using it on Crays, after all ;-)
  34.  
  35. The main distribution site for this software is:
  36.  
  37.         http://www.pythonware.com/products/pil/
  38.  
  39. That site also contains information about free and commercial support
  40. options, PIL add-ons, answers to frequently asked questions, and more.
  41.  
  42. The PIL handbook is not included in this distribution; to get the
  43. latest version, check:
  44.  
  45.         http://www.pythonware.com/library/
  46.  
  47. For installation and licensing details, see below.
  48.  
  49. --------------------------------------------------------------------
  50. Support Options
  51. --------------------------------------------------------------------
  52.  
  53. + Free Support
  54.  
  55. For support and general questions on the Python Imaging Library, send
  56. e-mail to the Image SIG mailing list:
  57.  
  58.         image-sig@python.org
  59.  
  60. You can join the Image SIG by sending a mail to:
  61.  
  62.         image-sig-request@python.org
  63.  
  64. Put "subscribe" in the message body to automatically subscribe to the
  65. list, or "help" to get additional information.  Alternatively, you can
  66. send your questions to the Python mailing list, python-list@python.org,
  67. or post them to the newsgroup comp.lang.python.
  68.  
  69. + Commercial Support
  70.  
  71. Secret Labs (PythonWare) offers support contracts for companies using
  72. the Python Imaging Library in commercial applications, or in mission-
  73. critical environments.  This includes technical support, bug fixes,
  74. extensions to the PIL library, sample applications, and more.
  75.  
  76. For the full story, check:
  77.  
  78.         http://www.pythonware.com/products/pil/support.htm
  79.  
  80. Or send a mail to:
  81.  
  82.         sales@pythonware.com
  83.  
  84. --------------------------------------------------------------------
  85. News Highlights in 1.1.2 (as compared to 1.0):
  86. --------------------------------------------------------------------
  87.  
  88. + Adapted to Python 1.6, 2.0 and 2.1.
  89.  
  90. + To reduce module dependencies, the Tkinter support has been
  91.   moved to a separate binary module.
  92.  
  93. + The JPEG decoder is more tolerant for broken files.  As long
  94.   as all image data can be read, it won't complain.
  95.  
  96. + The usual crop of bug fixes and performance tweaks.
  97.  
  98. For more information on these and other changes, see the CHANGES
  99. documents.
  100.  
  101. --------------------------------------------------------------------
  102. Software License
  103. --------------------------------------------------------------------
  104.  
  105. The Python Imaging Library is
  106.  
  107. Copyright (c) 1997-2001 by Secret Labs AB
  108. Copyright (c) 1995-2001 by Fredrik Lundh
  109.  
  110. By obtaining, using, and/or copying this software and/or its
  111. associated documentation, you agree that you have read, understood,
  112. and will comply with the following terms and conditions:
  113.  
  114. Permission to use, copy, modify, and distribute this software and its
  115. associated documentation for any purpose and without fee is hereby
  116. granted, provided that the above copyright notice appears in all
  117. copies, and that both that copyright notice and this permission notice
  118. appear in supporting documentation, and that the name of Secret Labs
  119. AB or the author not be used in advertising or publicity pertaining to
  120. distribution of the software without specific, written prior
  121. permission.
  122.  
  123. SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO
  124. THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  125. FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR
  126. ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  127. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  128. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  129. OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  130.  
  131.  
  132. --------------------------------------------------------------------
  133. Build instructions for UNIX
  134. --------------------------------------------------------------------
  135.  
  136. NOTE: To build the Python Imaging Library, you need an ANSI C com-
  137. piler.  The "cc" compiler on SunOS 4 is *not* ANSI compliant.  On that
  138. platform, use "acc" or "gcc" instead.  On some platforms, you may have
  139. to use compiler options like "-ansi" or "-std" to get full ANSI C
  140. support.
  141.  
  142. 1. If you need JPEG and/or PNG support, make sure to get and build
  143.    the necessary external libraries:
  144.  
  145.    - for JPEG support, get the IJG JPEG library, version 6a or 6b.
  146.  
  147.      You can find this library here:
  148.  
  149.           http://www.ijg.org
  150.           ftp://ftp.uu.net/graphics/jpeg/
  151.  
  152.    - for PNG and ZIP support, get the ZLIB library (by Gailly/Adler).
  153.      PIL was tested with version 1.0.4, but is likely to work with
  154.      versions from 0.95 and onwards.
  155.  
  156.      You can find this library here:
  157.  
  158.           http://www.info-zip.org/pub/infozip/zlib/
  159.  
  160.      If you have RedHat 4.2 or newer, the libraries provided with
  161.      the operating system should work just fine.
  162.  
  163.  
  164. 2. If you didn't build Python from sources, make sure you have
  165.    Python's build support files on your machine.  If you've down-
  166.    loaded a prebuilt package (e.g. a Linux RPM), you probably
  167.    need additional developer packages.
  168.  
  169.    If this doesn't mean anything to you, you can still carry out
  170.    steps 3 to 6 as described below.  Step 7 will probably fail,
  171.    though.
  172.  
  173. 3. Unpack the PIL distribution (the file Imaging-1.1.tar.gz)
  174.    in your Python extensions directory (if you have one.  If
  175.    not, feel free to unpack it in any other suitable directory).
  176.  
  177.         $ cd Python-2.0/Extensions # example
  178.         $ gunzip Imaging-1.1.2.tar.gz
  179.         $ tar xvf Imaging-1.1.2.tar
  180.  
  181.  
  182. 4. Now build the Imaging core library (libImaging.a):
  183.  
  184.         $ cd Imaging-1.1.2/libImaging
  185.         $ ./configure
  186.         $ make
  187.  
  188.    If you need to specify additional compiler options, the
  189.    second line should look something like:
  190.  
  191.         $ CC="cc -ansi" ./configure
  192.  
  193.  
  194. 5. To check that this library works as it should, type:
  195.  
  196.         $ make check
  197.  
  198.    (It isn't much of a test, but at least it shouldn't crash :-)
  199.  
  200.  
  201. 6. Go back to the Imaging directory.
  202.  
  203.    If you don't have the IJG JPEG or ZLIB libraries (or you have them,
  204.    but not in a standard place), copy the "Setup.in" file to "Setup"
  205.    and edit it according to the instructions in the file.
  206.  
  207.  
  208. 7. Edit Makefile.pre.in and build a Makefile following the instructions
  209.    there.  In most cases, you can simply give the following command:
  210.  
  211.         $ make -f Makefile.pre.in boot
  212.  
  213.    If this doesn't generate a Makefile, you probably don't have the
  214.    necessary build files on your machine.  See step 2 above for more
  215.    information.
  216.  
  217.  
  218. 8. To build a dynamically loaded module, just type "make":
  219.  
  220.         $ make
  221.  
  222.    This will create two files; "_imaging.so", and "_imagingtk.so"
  223.    (the latter isn't created if you commented out the Tcl/Tk inter-
  224.    face section in Setup.in)
  225.  
  226.    Then type (assuming a standard shell):
  227.  
  228.         $ PYTHONPATH=.:./PIL ; export PYTHONPATH
  229.         $ python
  230.  
  231.         >>> import _imaging
  232.         >>> import Image
  233.  
  234.    If both imports works, you've successfully added PIL to your Python
  235.    environment.
  236.  
  237.    There are a few demo scripts in the Imaging/Scripts directory that
  238.    you can use to further test the library.
  239.  
  240.  
  241. 9. Copy the "_imaging.so" module, the "_imagingtk.so" module, and the
  242.    contents of the "Imaging/PIL" directory to a suitable place along
  243.    the Python path.
  244.  
  245.    If you're using Python 1.5 or later, the preferred way is to create
  246.    a "PIL" subdirectory under "site-packages", copy the "PIL.pth" file
  247.    to "site-packages", and the rest of the files to the new subdirectory.
  248.  
  249.    Example:
  250.  
  251.         $ cp PIL.pth /usr/local/lib/Python1.5/site-packages
  252.         $ mkdir /usr/local/lib/Python1.5/site-packages/PIL
  253.         $ cp *.so PIL/* /usr/local/lib/Python1.5/site-packages/PIL
  254.  
  255.    You can also place "PIL" subdirectory anywhere along the Python
  256.    path, and use PIL as a package.
  257.  
  258.    Example:
  259.  
  260.         $ mkdir /usr/local/lib/Python1.5/PIL
  261.         $ cp *.so PIL/* /usr/local/lib/Python1.5/PIL
  262.  
  263. --------------------------------------------------------------------
  264. Build instructions for Windows
  265. --------------------------------------------------------------------
  266.  
  267. The current release does not include Windows makefiles.  For prebuilt
  268. versions, check the product site:
  269.  
  270.         http://www.pythonware.com/products/pil/
  271.  
  272. Building your own copy under Visual Studio should be straightforward;
  273. create a new project based on the sample extensions provided with
  274. Python (the target should be "_imaging.dll"), add all C files except
  275. "Except.c" and "coretest.c" to that project, check the contents of the
  276. "ImConfig.h" file (modify it if necessary), and build the DLL.
  277.  
  278. NOTE: Make sure to build PIL with the same linking options as
  279.       was used on the Python interpreter (usually /MD).  If you
  280.       mix linking options, anything can happen...  (the most
  281.       common problem is that "save" doesn't work!)
  282.  
  283. (If I'd used Visual Studio myself, I would have provided a project
  284. file.  But I don't.  Contributions are welcome, though...)
  285.  
  286. --------------------------------------------------------------------
  287. NOTE: If you use Tk on Windows, you may wish to install the booster
  288. patches which provides dramatic performance improvements for 16- and
  289. 24-bit displays.  See the description in the Tk subdirectory for
  290. details.
  291. --------------------------------------------------------------------
  292.