mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
commit
527c150eff
|
@ -15,19 +15,19 @@ LUT_SIZE = 1 << 9
|
|||
class LutBuilder:
|
||||
"""A class for building a MorphLut from a descriptive language
|
||||
|
||||
The input patterns is a list of a strings sequences like these:
|
||||
The input patterns is a list of a strings sequences like these::
|
||||
|
||||
4:(...
|
||||
.1.
|
||||
111)->1
|
||||
4:(...
|
||||
.1.
|
||||
111)->1
|
||||
|
||||
(whitespaces including linebreaks are ignored). The option 4
|
||||
describes a series of symmetry operations (in this case a
|
||||
4-rotation), the pattern is described by:
|
||||
|
||||
. or X - Ignore
|
||||
1 - Pixel is on
|
||||
0 - Pixel is off
|
||||
- . or X - Ignore
|
||||
- 1 - Pixel is on
|
||||
- 0 - Pixel is off
|
||||
|
||||
The result of the operation is described after "->" string.
|
||||
|
||||
|
@ -35,15 +35,16 @@ class LutBuilder:
|
|||
returned if no other match is found.
|
||||
|
||||
Operations:
|
||||
4 - 4 way rotation
|
||||
N - Negate
|
||||
1 - Dummy op for no other operation (an op must always be given)
|
||||
M - Mirroring
|
||||
|
||||
- 4 - 4 way rotation
|
||||
- N - Negate
|
||||
- 1 - Dummy op for no other operation (an op must always be given)
|
||||
- M - Mirroring
|
||||
|
||||
Example:
|
||||
|
||||
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
|
||||
lut = lb.build_lut()
|
||||
Example::
|
||||
|
||||
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
|
||||
lut = lb.build_lut()
|
||||
|
||||
"""
|
||||
def __init__(self, patterns=None, op_name=None):
|
||||
|
|
16
docs/PIL.rst
16
docs/PIL.rst
|
@ -20,14 +20,6 @@ can be found here.
|
|||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
:mod:`ExifTags` Module
|
||||
----------------------
|
||||
|
||||
.. automodule:: PIL.ExifTags
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
:mod:`FontFile` Module
|
||||
----------------------
|
||||
|
||||
|
@ -86,6 +78,14 @@ can be found here.
|
|||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
:mod:`ImageMorph` Module
|
||||
------------------------
|
||||
|
||||
.. automodule:: PIL.ImageMorph
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
:mod:`ImageShow` Module
|
||||
-----------------------
|
||||
|
||||
|
|
26
docs/reference/ExifTags.rst
Normal file
26
docs/reference/ExifTags.rst
Normal file
|
@ -0,0 +1,26 @@
|
|||
.. py:module:: PIL.ExifTags
|
||||
.. py:currentmodule:: PIL.ExifTags
|
||||
|
||||
:py:mod:`ExifTags` Module
|
||||
==========================
|
||||
|
||||
The :py:mod:`ExifTags` module exposes two dictionaries which
|
||||
provide constants and clear-text names for various well-known EXIF tags.
|
||||
|
||||
.. py:class:: PIL.ExifTags.TAGS
|
||||
|
||||
The TAG dictionary maps 16-bit integer EXIF tag enumerations to
|
||||
descriptive string names. For instance:
|
||||
|
||||
>>> from PIL.ExifTags import TAGS
|
||||
>>> TAGS[0x010e]
|
||||
'ImageDescription'
|
||||
|
||||
.. py:class:: PIL.ExifTags.GPSTAGS
|
||||
|
||||
The GPSTAGS dictionary maps 8-bit integer EXIF gps enumerations to
|
||||
descriptive string names. For instance:
|
||||
|
||||
>>> from PIL.ExifTags import GPSTAGS
|
||||
>>> GPSTAGS[20]
|
||||
'GPSDestLatitude'
|
|
@ -4,6 +4,7 @@ Reference
|
|||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
Image
|
||||
ImageChops
|
||||
ImageColor
|
||||
|
@ -22,5 +23,6 @@ Reference
|
|||
ImageStat
|
||||
ImageTk
|
||||
ImageWin
|
||||
ExifTags
|
||||
PSDraw
|
||||
../PIL
|
||||
|
|
Loading…
Reference in New Issue
Block a user