diff --git a/PIL/ImageMorph.py b/PIL/ImageMorph.py index b24dd134f..3f15621a6 100644 --- a/PIL/ImageMorph.py +++ b/PIL/ImageMorph.py @@ -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): diff --git a/docs/PIL.rst b/docs/PIL.rst index 6726f661f..3b4706511 100644 --- a/docs/PIL.rst +++ b/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 ----------------------- diff --git a/docs/reference/ExifTags.rst b/docs/reference/ExifTags.rst new file mode 100644 index 000000000..9fc7cd13b --- /dev/null +++ b/docs/reference/ExifTags.rst @@ -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' diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 2d57e37be..66310e3e7 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -4,6 +4,7 @@ Reference .. toctree:: :maxdepth: 2 + Image ImageChops ImageColor @@ -22,5 +23,6 @@ Reference ImageStat ImageTk ImageWin + ExifTags PSDraw ../PIL