Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Pillow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
Pillow
Commits
73de978a864b
Commit
73de978a864b
authored
5 years ago
by
Hugo van Kemenade
Browse files
Options
Downloads
Plain Diff
Merge pull request #4735 from nulano/refs-type
parents
8bfcbab3505d
ee3616455b4d
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/reference/Image.rst
+16
-24
16 additions, 24 deletions
docs/reference/Image.rst
docs/reference/ImageCms.rst
+57
-82
57 additions, 82 deletions
docs/reference/ImageCms.rst
docs/reference/ImageMath.rst
+6
-0
6 additions, 0 deletions
docs/reference/ImageMath.rst
with
79 additions
and
106 deletions
docs/reference/Image.rst
+
16
−
24
View file @
73de978a
...
...
@@ -273,9 +273,10 @@
Instances of the :py:class:`Image` class have the following attributes:
.. py:attribute:: filename
.. py:attribute:: Image.filename
:type: str
The filename or path of the source file. Only images created with the
factory function ``open`` have a filename attribute. If the input is a
file like object, the filename attribute is set to an empty string.
...
...
@@ -277,13 +278,12 @@
The filename or path of the source file. Only images created with the
factory function ``open`` have a filename attribute. If the input is a
file like object, the filename attribute is set to an empty string.
:type: :py:class:`string`
.. py:attribute:: format
.. py:attribute:: Image.format
:type: Optional[str]
The file format of the source file. For images created by the library
itself (via a factory function, or by running a method on an existing
image), this attribute is set to ``None``.
...
...
@@ -285,13 +285,12 @@
The file format of the source file. For images created by the library
itself (via a factory function, or by running a method on an existing
image), this attribute is set to ``None``.
:type: :py:class:`string` or ``None``
.. py:attribute:: mode
.. py:attribute:: Image.mode
:type: str
Image mode. This is a string specifying the pixel format used by the image.
Typical values are “1”, “L”, “RGB”, or “CMYK.” See
:ref:`concept-modes` for a full list.
...
...
@@ -293,11 +292,10 @@
Image mode. This is a string specifying the pixel format used by the image.
Typical values are “1”, “L”, “RGB”, or “CMYK.” See
:ref:`concept-modes` for a full list.
:type: :py:class:`string`
.. py:attribute:: size
.. py:attribute:: Image.size
:type: tuple[int]
Image size, in pixels. The size is given as a 2-tuple (width, height).
...
...
@@ -301,9 +299,8 @@
Image size, in pixels. The size is given as a 2-tuple (width, height).
:type: ``(width, height)``
.. py:attribute:: width
.. py:attribute:: Image.width
:type: int
Image width, in pixels.
...
...
@@ -307,9 +304,8 @@
Image width, in pixels.
:type: :py:class:`int`
.. py:attribute:: height
.. py:attribute:: Image.height
:type: int
Image height, in pixels.
...
...
@@ -313,11 +309,10 @@
Image height, in pixels.
:type: :py:class:`int`
.. py:attribute:: palette
.. py:attribute:: Image.palette
:type: Optional[PIL.ImagePalette.ImagePalette]
Colour palette table, if any. If mode is "P" or "PA", this should be an
instance of the :py:class:`~PIL.ImagePalette.ImagePalette` class.
Otherwise, it should be set to ``None``.
...
...
@@ -319,11 +314,10 @@
Colour palette table, if any. If mode is "P" or "PA", this should be an
instance of the :py:class:`~PIL.ImagePalette.ImagePalette` class.
Otherwise, it should be set to ``None``.
:type: :py:class:`~PIL.ImagePalette.ImagePalette` or ``None``
.. py:attribute:: info
.. py:attribute:: Image.info
:type: dict
A dictionary holding data associated with the image. This dictionary is
used by file handlers to pass on various non-image information read from
...
...
@@ -335,5 +329,3 @@
keep a reference to the info dictionary returned from the open method.
Unless noted elsewhere, this dictionary does not affect saving files.
:type: :py:class:`dict`
This diff is collapsed.
Click to expand it.
docs/reference/ImageCms.rst
+
57
−
82
View file @
73de978a
This diff is collapsed.
Click to expand it.
docs/reference/ImageMath.rst
+
6
−
0
View file @
73de978a
...
...
@@ -98,7 +98,8 @@
.. py:currentmodule:: None
.. py:function:: abs(image)
:noindex:
Absolute value.
.. py:function:: convert(image, mode)
...
...
@@ -101,9 +102,10 @@
Absolute value.
.. py:function:: convert(image, mode)
:noindex:
Convert image to the given mode. The mode must be given as a string
constant.
.. py:function:: float(image)
...
...
@@ -105,10 +107,11 @@
Convert image to the given mode. The mode must be given as a string
constant.
.. py:function:: float(image)
:noindex:
Convert image to 32-bit floating point. This is equivalent to
convert(image, “F”).
.. py:function:: int(image)
...
...
@@ -110,8 +113,9 @@
Convert image to 32-bit floating point. This is equivalent to
convert(image, “F”).
.. py:function:: int(image)
:noindex:
Convert image to 32-bit integer. This is equivalent to convert(image, “I”).
...
...
@@ -119,7 +123,8 @@
integers if necessary to get a correct result.
.. py:function:: max(image1, image2)
:noindex:
Maximum value.
.. py:function:: min(image1, image2)
...
...
@@ -122,6 +127,7 @@
Maximum value.
.. py:function:: min(image1, image2)
:noindex:
Minimum value.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment