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
8bfcbab3505d
Commit
8bfcbab3505d
authored
5 years ago
by
Hugo van Kemenade
Browse files
Options
Downloads
Plain Diff
Merge pull request #4734 from nulano/refs-missing
parents
13bc32f8e5eb
a55d997a4963
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/reference/ImageCms.rst
+24
-3
24 additions, 3 deletions
docs/reference/ImageCms.rst
docs/reference/ImageFile.rst
+12
-5
12 additions, 5 deletions
docs/reference/ImageFile.rst
src/PIL/ImageCms.py
+45
-42
45 additions, 42 deletions
src/PIL/ImageCms.py
src/PIL/ImageFile.py
+1
-1
1 addition, 1 deletion
src/PIL/ImageFile.py
with
82 additions
and
51 deletions
docs/reference/ImageCms.rst
+
24
−
3
View file @
8bfcbab3
...
...
@@ -8,9 +8,30 @@
support using the LittleCMS2 color management engine, based on Kevin
Cazabon's PyCMS library.
.. automodule:: PIL.ImageCms
:members:
:noindex:
.. autoclass:: ImageCmsTransform
.. autoexception:: PyCMSError
Functions
---------
.. autofunction:: applyTransform
.. autofunction:: buildProofTransform
.. autofunction:: buildProofTransformFromOpenProfiles
.. autofunction:: buildTransform
.. autofunction:: buildTransformFromOpenProfiles
.. autofunction:: createProfile
.. autofunction:: getDefaultIntent
.. autofunction:: getOpenProfile
.. autofunction:: getProfileCopyright
.. autofunction:: getProfileDescription
.. autofunction:: getProfileInfo
.. autofunction:: getProfileManufacturer
.. autofunction:: getProfileModel
.. autofunction:: getProfileName
.. autofunction:: get_display_profile
.. autofunction:: isIntentSupported
.. autofunction:: profileToProfile
.. autofunction:: versions
CmsProfile
----------
...
...
This diff is collapsed.
Click to expand it.
docs/reference/ImageFile.rst
+
12
−
5
View file @
8bfcbab3
...
...
@@ -34,9 +34,9 @@
im.save("copy.jpg")
:py:class:`~PIL.ImageFile.Parser`
-------
--------------------------
Classes
-------
.. autoclass:: PIL.ImageFile.Parser()
:members:
...
...
@@ -39,9 +39,6 @@
.. autoclass:: PIL.ImageFile.Parser()
:members:
:py:class:`~PIL.ImageFile.PyDecoder`
------------------------------------
.. autoclass:: PIL.ImageFile.PyDecoder()
:members:
...
...
@@ -46,2 +43,12 @@
.. autoclass:: PIL.ImageFile.PyDecoder()
:members:
.. autoclass:: PIL.ImageFile.ImageFile()
:member-order: bysource
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: PIL.ImageFile.StubImageFile()
:members:
:show-inheritance:
This diff is collapsed.
Click to expand it.
src/PIL/ImageCms.py
+
45
−
42
View file @
8bfcbab3
...
...
@@ -295,7 +295,8 @@
``inputProfile`` to ``outputProfile``.
If the input or output profiles specified are not valid filenames, a
``PyCMSError`` will be raised. If ``inPlace`` is ``True`` and
``outputMode != im.mode``, a ``PyCMSError`` will be raised. If an error
occurs during application of the profiles, a ``PyCMSError`` will be raised.
:exc:`PyCMSError` will be raised. If ``inPlace`` is ``True`` and
``outputMode != im.mode``, a :exc:`PyCMSError` will be raised.
If an error occurs during application of the profiles,
a :exc:`PyCMSError` will be raised.
If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS),
...
...
@@ -301,5 +302,5 @@
If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS),
a
`
`PyCMSError`
`
will be raised.
a
:exc:
`PyCMSError` will be raised.
This function applies an ICC transformation to im from ``inputProfile``
'
s
color space to ``outputProfile``
'
s color space using the specified rendering
...
...
@@ -381,8 +382,8 @@
The PyCMSProfile object can be passed back into pyCMS for use in creating
transforms and such (as in ImageCms.buildTransformFromOpenProfiles()).
If ``profileFilename`` is not a valid filename for an ICC profile,
a ``PyCMSError``
will be raised.
If ``profileFilename`` is not a valid filename for an ICC profile,
a :exc:`PyCMSError`
will be raised.
:param profileFilename: String, as a valid filename path to the ICC profile
you wish to open, or a file-like object.
...
...
@@ -410,7 +411,7 @@
image.
If the input or output profiles specified are not valid filenames, a
`
`PyCMSError`
`
will be raised. If an error occurs during creation
of the
transform, a
`
`PyCMSError`
`
will be raised.
:exc:
`PyCMSError` will be raised. If an error occurs during creation
of the
transform, a
:exc:
`PyCMSError` will be raised.
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
...
...
@@ -415,6 +416,6 @@
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a
`
`PyCMSError`
`
will be raised.
(or by pyCMS), a
:exc:
`PyCMSError` will be raised.
This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile`` using the ``renderingIntent`` to determine what to do
...
...
@@ -493,5 +494,5 @@
obtained on the ``proofProfile`` device.
If the input, output, or proof profiles specified are not valid
filenames, a
`
`PyCMSError`
`
will be raised.
filenames, a
:exc:
`PyCMSError` will be raised.
...
...
@@ -497,5 +498,5 @@
If an error occurs during creation of the transform,
a ``PyCMSError``
will be raised.
If an error occurs during creation of the transform,
a :exc:`PyCMSError`
will be raised.
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
...
...
@@ -500,6 +501,6 @@
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a
`
`PyCMSError`
`
will be raised.
(or by pyCMS), a
:exc:
`PyCMSError` will be raised.
This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile``, but tries to simulate the result that would be
...
...
@@ -596,6 +597,6 @@
"""
(pyCMS) Applies a transform to a given image.
If ``im.mode != transform.inMode``, a
`
`PyCMSError`
`
is raised.
If ``im.mode != transform.inMode``, a
:exc:
`PyCMSError` is raised.
If ``inPlace`` is ``True`` and ``transform.inMode != transform.outMode``, a
...
...
@@ -600,6 +601,6 @@
If ``inPlace`` is ``True`` and ``transform.inMode != transform.outMode``, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
If ``im.mode``, ``transform.inMode`` or ``transform.outMode`` is not
supported by pyCMSdll or the profiles you used for the transform, a
...
...
@@ -603,5 +604,5 @@
If ``im.mode``, ``transform.inMode`` or ``transform.outMode`` is not
supported by pyCMSdll or the profiles you used for the transform, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
...
...
@@ -607,6 +608,6 @@
If an error occurs while the transform is being applied,
a ``PyCMSError``
is raised.
If an error occurs while the transform is being applied,
a :exc:`PyCMSError`
is raised.
This function applies a pre-calculated transform (from
ImageCms.buildTransform() or ImageCms.buildTransformFromOpenProfiles())
...
...
@@ -649,5 +650,6 @@
"""
(pyCMS) Creates a profile.
If colorSpace not in ``[
"
LAB
"
,
"
XYZ
"
,
"
sRGB
"
]``, a ``PyCMSError`` is raised.
If colorSpace not in ``[
"
LAB
"
,
"
XYZ
"
,
"
sRGB
"
]``,
a :exc:`PyCMSError` is raised.
...
...
@@ -653,4 +655,4 @@
If using LAB and ``colorTemp`` is not a positive integer,
a ``PyCMSError`` is
raised.
If using LAB and ``colorTemp`` is not a positive integer,
a :exc:`PyCMSError` is
raised.
...
...
@@ -656,5 +658,6 @@
If an error occurs while creating the profile, a ``PyCMSError`` is raised.
If an error occurs while creating the profile,
a :exc:`PyCMSError` is raised.
Use this function to create common profiles on-the-fly instead of
having to supply a profile on disk and knowing the path to it. It
...
...
@@ -699,8 +702,8 @@
(pyCMS) Gets the internal product name for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile,
a
`
`PyCMSError`
`
is raised If an error occurs while trying
to obtain the
name tag, a
`
`PyCMSError`
`
is raised.
a
:exc:
`PyCMSError` is raised If an error occurs while trying
to obtain the
name tag, a
:exc:
`PyCMSError` is raised.
Use this function to obtain the INTERNAL name of the profile (stored
in an ICC tag in the profile itself), usually the one used when the
...
...
@@ -740,5 +743,5 @@
(pyCMS) Gets the internal product information for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile,
a
`
`PyCMSError`
`
is raised.
a
:exc:
`PyCMSError` is raised.
...
...
@@ -744,6 +747,6 @@
If an error occurs while trying to obtain the info tag,
a ``PyCMSError``
is raised.
If an error occurs while trying to obtain the info tag,
a :exc:`PyCMSError`
is raised.
Use this function to obtain the information stored in the profile
'
s
info tag. This often contains details about the profile, and how it
...
...
@@ -780,5 +783,5 @@
(pyCMS) Gets the copyright for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
...
...
@@ -784,6 +787,6 @@
If an error occurs while trying to obtain the copyright tag,
a ``PyCMSError``
is raised.
If an error occurs while trying to obtain the copyright tag,
a :exc:`PyCMSError`
is raised.
Use this function to obtain the information stored in the profile
'
s
copyright tag.
...
...
@@ -808,6 +811,6 @@
(pyCMS) Gets the manufacturer for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
If an error occurs while trying to obtain the manufacturer tag, a
...
...
@@ -812,6 +815,6 @@
If an error occurs while trying to obtain the manufacturer tag, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
Use this function to obtain the information stored in the profile
'
s
manufacturer tag.
...
...
@@ -836,5 +839,5 @@
(pyCMS) Gets the model for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
...
...
@@ -840,6 +843,6 @@
If an error occurs while trying to obtain the model tag,
a ``PyCMSError``
is raised.
If an error occurs while trying to obtain the model tag,
a :exc:`PyCMSError`
is raised.
Use this function to obtain the information stored in the profile
'
s
model tag.
...
...
@@ -865,5 +868,5 @@
(pyCMS) Gets the description for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
...
...
@@ -869,6 +872,6 @@
If an error occurs while trying to obtain the description tag,
a ``PyCMSError``
is raised.
If an error occurs while trying to obtain the description tag,
a :exc:`PyCMSError`
is raised.
Use this function to obtain the information stored in the profile
'
s
description tag.
...
...
@@ -894,6 +897,6 @@
(pyCMS) Gets the default intent name for the given profile.
If ``profile`` isn
'
t a valid CmsProfile object or filename to a profile, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
If an error occurs while trying to obtain the default intent, a
...
...
@@ -898,6 +901,6 @@
If an error occurs while trying to obtain the default intent, a
`
`PyCMSError`
`
is raised.
:exc:
`PyCMSError` is raised.
Use this function to determine the default (and usually best optimized)
rendering intent for this profile. Most profiles support multiple
...
...
@@ -940,8 +943,8 @@
be used for others. Some profiles can only be used for certain
rendering intents, so it
'
s best to either verify this before trying
to create a transform with them (using this function), or catch the
potential
`
`PyCMSError`
`
that will occur if they don
'
t
support the modes
you select.
potential
:exc:
`PyCMSError` that will occur if they don
'
t
support the modes
you select.
:param profile: EITHER a valid CmsProfile object, OR a string of the
filename of an ICC profile.
...
...
This diff is collapsed.
Click to expand it.
src/PIL/ImageFile.py
+
1
−
1
View file @
8bfcbab3
...
...
@@ -85,7 +85,7 @@
class
ImageFile
(
Image
.
Image
):
"
Base class for image file format handlers.
"
""
"
Base class for image file format handlers.
"
""
def
__init__
(
self
,
fp
=
None
,
filename
=
None
):
super
().
__init__
()
...
...
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