mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
commit
527c150eff
|
@ -15,19 +15,19 @@ LUT_SIZE = 1 << 9
|
||||||
class LutBuilder:
|
class LutBuilder:
|
||||||
"""A class for building a MorphLut from a descriptive language
|
"""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:(...
|
4:(...
|
||||||
.1.
|
.1.
|
||||||
111)->1
|
111)->1
|
||||||
|
|
||||||
(whitespaces including linebreaks are ignored). The option 4
|
(whitespaces including linebreaks are ignored). The option 4
|
||||||
describes a series of symmetry operations (in this case a
|
describes a series of symmetry operations (in this case a
|
||||||
4-rotation), the pattern is described by:
|
4-rotation), the pattern is described by:
|
||||||
|
|
||||||
. or X - Ignore
|
- . or X - Ignore
|
||||||
1 - Pixel is on
|
- 1 - Pixel is on
|
||||||
0 - Pixel is off
|
- 0 - Pixel is off
|
||||||
|
|
||||||
The result of the operation is described after "->" string.
|
The result of the operation is described after "->" string.
|
||||||
|
|
||||||
|
@ -35,15 +35,16 @@ class LutBuilder:
|
||||||
returned if no other match is found.
|
returned if no other match is found.
|
||||||
|
|
||||||
Operations:
|
Operations:
|
||||||
4 - 4 way rotation
|
|
||||||
N - Negate
|
- 4 - 4 way rotation
|
||||||
1 - Dummy op for no other operation (an op must always be given)
|
- N - Negate
|
||||||
M - Mirroring
|
- 1 - Dummy op for no other operation (an op must always be given)
|
||||||
|
- M - Mirroring
|
||||||
|
|
||||||
Example:
|
Example::
|
||||||
|
|
||||||
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
|
lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
|
||||||
lut = lb.build_lut()
|
lut = lb.build_lut()
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, patterns=None, op_name=None):
|
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:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
:mod:`ExifTags` Module
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
.. automodule:: PIL.ExifTags
|
|
||||||
:members:
|
|
||||||
:undoc-members:
|
|
||||||
:show-inheritance:
|
|
||||||
|
|
||||||
:mod:`FontFile` Module
|
:mod:`FontFile` Module
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
@ -86,6 +78,14 @@ can be found here.
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
:mod:`ImageMorph` Module
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
.. automodule:: PIL.ImageMorph
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
:mod:`ImageShow` Module
|
: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::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
|
||||||
Image
|
Image
|
||||||
ImageChops
|
ImageChops
|
||||||
ImageColor
|
ImageColor
|
||||||
|
@ -22,5 +23,6 @@ Reference
|
||||||
ImageStat
|
ImageStat
|
||||||
ImageTk
|
ImageTk
|
||||||
ImageWin
|
ImageWin
|
||||||
|
ExifTags
|
||||||
PSDraw
|
PSDraw
|
||||||
../PIL
|
../PIL
|
||||||
|
|
Loading…
Reference in New Issue
Block a user