$Id: //modules/pil/pilwmf/README#3 $

==============================
PIL WMF/EMF driver for Windows
==============================

This module contains a simple WMF/EMF render plugin for Windows.

The current version supports "placeable windows metafiles" (WMF) and
"enhanced metafiles" (EMF).

To use this renderer, make sure you have PIL 1.1.5a1 or later, and
import the WmfPlugin module before you open the WMF file.  An example:

    import Image
    import WmfPlugin # activate WMF renderer

    im = Image.open("example.wmf")
    im.load() # render the file
    im.save("example.png")

The extra "load" call is only necessary if you're using PIL 1.1.5a1,
and you're calling "save" on a newly opened image.  If you omit the
call, you will get an exception (referring to a missing "encoderinfo"
attribute).  This bug has been fixed in 1.1.5a2.

By default, the plugin renders WMF images at 72 dpi.  You can change
this by modifying the "size" attribute before you load the image:

    im = Image.open("example.wmf")
    im.size = 1000, 1000 # render at 1000x1000 pixels
    im.load() # render!

For EMF images, the plugin uses the resolution specified in the file.
You can still modify the "size" attribute to render at a different
size:

    im = Image.open("example.emf")
    size = im.size
    im.size = size[0]*2, size[0]*2 # render at twice the size
    im.load() # render!
    im = im.resize(size, Image.BILINEAR) # poor mans antialiasing

Enjoy /F

fredrik@pythonware.com
http://www.pythonware.com

--------------------------------------------------------------------
The PIL WMF package is:

Copyright (c) 2004 by Fredrik Lundh

By obtaining, using, and/or copying this software and/or its
associated documentation, you agree that you have read, understood,
and will comply with the following terms and conditions:

Permission to use, copy, modify, and distribute this software and its
associated documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appears in all
copies, and that both that copyright notice and this permission notice
appear in supporting documentation, and that the name of Secret Labs
AB or the author not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS.  IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

--------------------------------------------------------------------
