~edwin-grubbs/python-imaging/trunk

« back to all changes in this revision

Viewing changes to Docs/pythondoc-PIL.ImageOps.html

  • Committer: effbot
  • Date: 2006-03-01 19:31:18 UTC
  • Revision ID: svn-v4:be285980-f00d-0410-a9fe-d4747b46ecd0:pil:24
To prepare to load Imaging-1.1.5 into pil, perform 59 renames.

* pil/Docs/pythondoc-PIL.ArgImagePlugin.html: Renamed from
  pil/Docs/PIL.ArgImagePlugin.html.
* pil/Docs/pythondoc-PIL.BdfFontFile.html: Renamed from
  pil/Docs/PIL.BdfFontFile.html.
* pil/Docs/pythondoc-PIL.BmpImagePlugin.html: Renamed from
  pil/Docs/PIL.BmpImagePlugin.html.
* pil/Docs/pythondoc-PIL.BufrStubImagePlugin.html: Renamed from
  pil/Docs/PIL.ContainerIO.html.
* pil/Docs/pythondoc-PIL.CurImagePlugin.html: Renamed from
  pil/Docs/PIL.CurImagePlugin.html.
* pil/Docs/pythondoc-PIL.DcxImagePlugin.html: Renamed from
  pil/Docs/PIL.DcxImagePlugin.html.
* pil/Docs/pythondoc-PIL.EpsImagePlugin.html: Renamed from
  pil/Docs/PIL.EpsImagePlugin.html.
* pil/Docs/pythondoc-PIL.FliImagePlugin.html: Renamed from
  pil/Docs/PIL.FliImagePlugin.html.
* pil/Docs/pythondoc-PIL.FontFile.html: Renamed from
  pil/Docs/PIL.FontFile.html.
* pil/Docs/pythondoc-PIL.FpxImagePlugin.html: Renamed from
  pil/Docs/PIL.FpxImagePlugin.html.
* pil/Docs/pythondoc-PIL.GbrImagePlugin.html: Renamed from
  pil/Docs/PIL.GbrImagePlugin.html.
* pil/Docs/pythondoc-PIL.GdImageFile.html: Renamed from
  pil/Docs/PIL.GdImageFile.html.
* pil/Docs/pythondoc-PIL.GifImagePlugin.html: Renamed from
  pil/Docs/PIL.GifImagePlugin.html.
* pil/Docs/pythondoc-PIL.GimpGradientFile.html: Renamed from
  pil/Docs/PIL.GimpGradientFile.html.
* pil/Docs/pythondoc-PIL.GimpPaletteFile.html: Renamed from
  pil/Docs/PIL.GimpPaletteFile.html.
* pil/Docs/pythondoc-PIL.IcoImagePlugin.html: Renamed from
  pil/Docs/PIL.IcoImagePlugin.html.
* pil/Docs/pythondoc-PIL.Image.html: Renamed from
  pil/Docs/PIL.Image.html.
* pil/Docs/pythondoc-PIL.ImageChops.html: Renamed from
  pil/Docs/PIL.ImageChops.html.
* pil/Docs/pythondoc-PIL.ImageColor.html: Renamed from
  pil/Docs/PIL.ImageColor.html.
* pil/Docs/pythondoc-PIL.ImageDraw.html: Renamed from
  pil/Docs/PIL.ImageDraw.html.
* pil/Docs/pythondoc-PIL.ImageEnhance.html: Renamed from
  pil/Docs/PIL.ImageEnhance.html.
* pil/Docs/pythondoc-PIL.ImageFile.html: Renamed from
  pil/Docs/PIL.ImageFile.html.
* pil/Docs/pythondoc-PIL.ImageFileIO.html: Renamed from
  pil/Docs/PIL.ImageFileIO.html.
* pil/Docs/pythondoc-PIL.ImageFilter.html: Renamed from
  pil/Docs/PIL.ImageFilter.html.
* pil/Docs/pythondoc-PIL.ImageFont.html: Renamed from
  pil/Docs/PIL.ImageFont.html.
* pil/Docs/pythondoc-PIL.ImageGrab.html: Renamed from
  pil/Docs/PIL.ImageGrab.html.
* pil/Docs/pythondoc-PIL.ImageOps.html: Renamed from
  pil/Docs/PIL.ImageOps.html.
* pil/Docs/pythondoc-PIL.ImageSequence.html: Renamed from
  pil/Docs/PIL.ImageSequence.html.
* pil/Docs/pythondoc-PIL.ImageStat.html: Renamed from
  pil/Docs/PIL.ImageStat.html.
* pil/Docs/pythondoc-PIL.ImageTk.html: Renamed from
  pil/Docs/PIL.ImageTk.html.
* pil/Docs/pythondoc-PIL.ImageTransform.html: Renamed from
  pil/Docs/PIL.ImageTransform.html.
* pil/Docs/pythondoc-PIL.ImageWin.html: Renamed from
  pil/Docs/PIL.ImageWin.html.
* pil/Docs/pythondoc-PIL.ImImagePlugin.html: Renamed from
  pil/Docs/PIL.ImImagePlugin.html.
* pil/Docs/pythondoc-PIL.ImtImagePlugin.html: Renamed from
  pil/Docs/PIL.ImtImagePlugin.html.
* pil/Docs/pythondoc-PIL.IptcImagePlugin.html: Renamed from
  pil/Docs/PIL.IptcImagePlugin.html.
* pil/Docs/pythondoc-PIL.JpegImagePlugin.html: Renamed from
  pil/Docs/PIL.JpegImagePlugin.html.
* pil/Docs/pythondoc-PIL.McIdasImagePlugin.html: Renamed from
  pil/Docs/PIL.McIdasImagePlugin.html.
* pil/Docs/pythondoc-PIL.MicImagePlugin.html: Renamed from
  pil/Docs/PIL.MicImagePlugin.html.
* pil/Docs/pythondoc-PIL.MpegImagePlugin.html: Renamed from
  pil/Docs/PIL.MpegImagePlugin.html.
* pil/Docs/pythondoc-PIL.MspImagePlugin.html: Renamed from
  pil/Docs/PIL.MspImagePlugin.html.
* pil/Docs/pythondoc-PIL.PaletteFile.html: Renamed from
  pil/Docs/PIL.PaletteFile.html.
* pil/Docs/pythondoc-PIL.PcdImagePlugin.html: Renamed from
  pil/Docs/PIL.PcdImagePlugin.html.
* pil/Docs/pythondoc-PIL.PcfFontFile.html: Renamed from
  pil/Docs/PIL.PcfFontFile.html.
* pil/Docs/pythondoc-PIL.PcxImagePlugin.html: Renamed from
  pil/Docs/PIL.PcxImagePlugin.html.
* pil/Docs/pythondoc-PIL.PixarImagePlugin.html: Renamed from
  pil/Docs/PIL.PixarImagePlugin.html.
* pil/Docs/pythondoc-PIL.PngImagePlugin.html: Renamed from
  pil/Docs/PIL.PngImagePlugin.html.
* pil/Docs/pythondoc-PIL.PpmImagePlugin.html: Renamed from
  pil/Docs/PIL.PpmImagePlugin.html.
* pil/Docs/pythondoc-PIL.PsdImagePlugin.html: Renamed from
  pil/Docs/PIL.PsdImagePlugin.html.
* pil/Docs/pythondoc-PIL.SgiImagePlugin.html: Renamed from
  pil/Docs/PIL.SgiImagePlugin.html.
* pil/Docs/pythondoc-PIL.SunImagePlugin.html: Renamed from
  pil/Docs/PIL.SunImagePlugin.html.
* pil/Docs/pythondoc-PIL.TarIO.html: Renamed from
  pil/Docs/PIL.TarIO.html.
* pil/Docs/pythondoc-PIL.TgaImagePlugin.html: Renamed from
  pil/Docs/PIL.TgaImagePlugin.html.
* pil/Docs/pythondoc-PIL.TiffImagePlugin.html: Renamed from
  pil/Docs/PIL.TiffImagePlugin.html.
* pil/Docs/pythondoc-PIL.WalImageFile.html: Renamed from
  pil/Docs/PIL.WalImageFile.html.
* pil/Docs/pythondoc-PIL.WmfImagePlugin.html: Renamed from
  pil/Docs/PIL.WmfImagePlugin.html.
* pil/Docs/pythondoc-PIL.XbmImagePlugin.html: Renamed from
  pil/Docs/PIL.XbmImagePlugin.html.
* pil/Docs/pythondoc-PIL.XpmImagePlugin.html: Renamed from
  pil/Docs/PIL.XpmImagePlugin.html.
* pil/Docs/pythondoc-PIL.XVThumbImagePlugin.html: Renamed from
  pil/Docs/PIL.XVThumbImagePlugin.html.
* pil/Docs/effbot.css: Renamed from pil/Docs/pythondoc.css.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><title>Module PIL.ImageOps</title><link href="pythondoc.css" rel="stylesheet" title="style" /></head><body><h1>Module PIL.ImageOps</h1><h4>Module Summary:</h4><pre><a href="#70">def autocontrast</a>(image, cutoff=0, ignore=None)</pre><blockquote>Maximize (normalize) image contrast.</blockquote><pre><a href="#145">def colorize</a>(image, black, white)</pre><blockquote>Colorize grayscale image.</blockquote><pre><a href="#167">def crop</a>(image, border=0)</pre><blockquote>Remove border from image.</blockquote><pre><a href="#182">def deform</a>(image, deformer, resample=2)</pre><blockquote>Deform the image.</blockquote><pre><a href="#196">def equalize</a>(image)</pre><blockquote>Equalize the image histogram.</blockquote><pre><a href="#219">def expand</a>(image, border=0, fill=0)</pre><pre><a href="#251">def fit</a>(image, size, method=0, bleed=0.0, centering=(0.5, 0.5))</pre><blockquote>Returns a sized and cropped version of the image, cropped to the
 
2
requested aspect ratio and size.</blockquote><pre><a href="#326">def flip</a>(image)</pre><blockquote>Flip the image vertically (top to bottom).</blockquote><pre><a href="#336">def grayscale</a>(image)</pre><blockquote>Convert the image to grayscale.</blockquote><pre><a href="#346">def invert</a>(image)</pre><blockquote>Invert (negate) the image.</blockquote><pre><a href="#359">def mirror</a>(image)</pre><blockquote>Flip image horizontally (left to right).</blockquote><pre><a href="#370">def posterize</a>(image, bits)</pre><blockquote>Reduce the number of bits for each colour channel.</blockquote><pre><a href="#385">def solarize</a>(image, threshold=128)</pre><blockquote>Invert all pixel values above a threshold.</blockquote><h2>Functions</h2><div class="function" id="70"><h3>autocontrast</h3><pre>autocontrast(image, cutoff=0, ignore=None)</pre><p>Maximize (normalize) image contrast.  This function calculates a
 
3
histogram of the input image, removes <i>cutoff</i> percent of the
 
4
lightest and darkest pixels from the histogram, and remaps the image
 
5
so that the darkest pixel becomes black (0), and the lightest
 
6
becomes white (255).
 
7
 
 
8
</p><h4>Parameters:</h4><p><code>image</code> -- The image to process.
 
9
</p><p><code>cutoff</code> -- How many percent to cut off from the histogram.
 
10
</p><p><code>ignore</code> -- The background pixel value (use None for no background).
 
11
</p><h4>Returns:</h4><p>An image.
 
12
</p></div><div class="function" id="145"><h3>colorize</h3><pre>colorize(image, black, white)</pre><p>Colorize grayscale image.  The <i>black</i> and <i>white</i>
 
13
arguments should be RGB tuples; this function calculates a colour
 
14
wedge mapping all black pixels in the source image to the first
 
15
colour, and all white pixels to the second colour.
 
16
 
 
17
</p><h4>Parameters:</h4><p><code>image</code> -- The image to colourize.
 
18
</p><p><code>black</code> -- The colour to use for black input pixels.
 
19
</p><p><code>white</code> -- The colour to use for white input pixels.
 
20
</p><h4>Returns:</h4><p>An image.
 
21
</p></div><div class="function" id="167"><h3>crop</h3><pre>crop(image, border=0)</pre><p>Remove border from image.  The same amount of pixels are removed
 
22
from all four sides.  This function works on all image modes.
 
23
 
 
24
</p><h4>Parameters:</h4><p><code>image</code> -- The image to crop.
 
25
</p><p><code>border</code> -- The number of pixels to remove.
 
26
</p><h4>Returns:</h4><p>An image.
 
27
</p></div><div class="function" id="182"><h3>deform</h3><pre>deform(image, deformer, resample=2)</pre><p>Deform the image.
 
28
 
 
29
</p><h4>Parameters:</h4><p><code>image</code> -- The image to deform.
 
30
</p><p><code>deformer</code> -- A deformer object.
 
31
</p><p><code>resample</code> -- What resampling filter to use.
 
32
</p><h4>Returns:</h4><p>An image.
 
33
</p></div><div class="function" id="196"><h3>equalize</h3><pre>equalize(image)</pre><p>Equalize the image histogram.  This function applies a non-linear
 
34
mapping to the input image, in order to create a uniform
 
35
distribution of grayscale values in the output image.
 
36
 
 
37
</p><h4>Parameters:</h4><p><code>image</code> -- The image to equalize.
 
38
</p><h4>Returns:</h4><p>An image.
 
39
</p></div><div class="function" id="219"><h3>expand</h3><pre>expand(image, border=0, fill=0)</pre><p>Add border to the image
 
40
 
 
41
</p><h4>Parameters:</h4><p><code>image</code> -- The image to expand.
 
42
</p><p><code>border</code> -- Border width, in pixels.
 
43
</p><p><code>fill</code> -- Pixel fill value (a colour value).  Default is 0 (black).
 
44
</p><h4>Returns:</h4><p>An image.
 
45
</p></div><div class="function" id="251"><h3>fit</h3><pre>fit(image, size, method=0, bleed=0.0, centering=(0.5, 0.5))</pre><p>Returns a sized and cropped version of the image, cropped to the
 
46
requested aspect ratio and size.
 
47
</p><p>
 
48
The <b>fit</b> function was contributed by Kevin Cazabon.
 
49
 
 
50
</p><h4>Parameters:</h4><p><code>size</code> -- The requested output size in pixels, given as a
 
51
    (width, height) tuple.
 
52
</p><p><code>method</code> -- What resampling method to use.  Default is Image.NEAREST.
 
53
</p><p><code>bleed</code> -- Remove a border around the outside of the image (from all
 
54
    four edges.  The value is a decimal percentage (use 0.01 for one
 
55
    percent).  The default value is 0 (no border).
 
56
</p><p><code>centering</code> -- Control the cropping position.  Use (0.5, 0.5) for
 
57
    center cropping (e.g. if cropping the width, take 50% off of the
 
58
    left side, and therefore 50% off the right side).  (0.0, 0.0)
 
59
    will crop from the top left corner (i.e. if cropping the width,
 
60
    take all of the crop off of the right side, and if cropping the
 
61
    height, take all of it off the bottom).  (1.0, 0.0) will crop
 
62
    from the bottom left corner, etc. (i.e. if cropping the width,
 
63
    take all of the crop off the left side, and if cropping the height
 
64
    take none from the top, and therefore all off the bottom).
 
65
</p><h4>Returns:</h4><p>An image.
 
66
</p></div><div class="function" id="326"><h3>flip</h3><pre>flip(image)</pre><p>Flip the image vertically (top to bottom).
 
67
 
 
68
</p><h4>Parameters:</h4><p><code>image</code> -- The image to flip.
 
69
</p><h4>Returns:</h4><p>An image.
 
70
</p></div><div class="function" id="336"><h3>grayscale</h3><pre>grayscale(image)</pre><p>Convert the image to grayscale.
 
71
 
 
72
</p><h4>Parameters:</h4><p><code>image</code> -- The image to convert.
 
73
</p><h4>Returns:</h4><p>An image.
 
74
</p></div><div class="function" id="346"><h3>invert</h3><pre>invert(image)</pre><p>Invert (negate) the image.
 
75
 
 
76
</p><h4>Parameters:</h4><p><code>image</code> -- The image to invert.
 
77
</p><h4>Returns:</h4><p>An image.
 
78
</p></div><div class="function" id="359"><h3>mirror</h3><pre>mirror(image)</pre><p>Flip image horizontally (left to right).
 
79
 
 
80
</p><h4>Parameters:</h4><p><code>image</code> -- The image to mirror.
 
81
</p><h4>Returns:</h4><p>An image.
 
82
</p></div><div class="function" id="370"><h3>posterize</h3><pre>posterize(image, bits)</pre><p>Reduce the number of bits for each colour channel.
 
83
 
 
84
</p><h4>Parameters:</h4><p><code>image</code> -- The image to posterize.
 
85
</p><p><code>bits</code> -- The number of bits to keep for each channel (1-8).
 
86
</p><h4>Returns:</h4><p>An image.
 
87
</p></div><div class="function" id="385"><h3>solarize</h3><pre>solarize(image, threshold=128)</pre><p>Invert all pixel values above a threshold.
 
88
 
 
89
</p><h4>Parameters:</h4><p><code>image</code> -- The image to posterize.
 
90
</p><p><code>threshold</code> -- All pixels above this greyscale level are inverted.
 
91
</p><h4>Returns:</h4><p>An image.
 
92
</p></div></body></html>
 
 
b'\\ No newline at end of file'