Changed errors to be code formatted, instead of bold

This commit is contained in:
Andrew Murray 2020-06-12 23:57:21 +10:00
parent 7dd818fc36
commit 09d58147ca
2 changed files with 34 additions and 34 deletions

View File

@ -2163,7 +2163,7 @@ class Image:
""" """
Seeks to the given frame in this sequence file. If you seek Seeks to the given frame in this sequence file. If you seek
beyond the end of the sequence, the method raises an beyond the end of the sequence, the method raises an
**EOFError** exception. When a sequence file is opened, the ``EOFError`` exception. When a sequence file is opened, the
library automatically seeks to frame 0. library automatically seeks to frame 0.
See :py:meth:`~PIL.Image.Image.tell`. See :py:meth:`~PIL.Image.Image.tell`.

View File

@ -295,11 +295,11 @@ def profileToProfile(
``inputProfile`` to ``outputProfile``. ``inputProfile`` to ``outputProfile``.
If the input or output profiles specified are not valid filenames, a If the input or output profiles specified are not valid filenames, a
**PyCMSError** will be raised. If ``inPlace`` is ``True`` and ``PyCMSError`` will be raised. If ``inPlace`` is ``True`` and
``outputMode != im.mode``, a **PyCMSError** will be raised. If an error ``outputMode != im.mode``, a ``PyCMSError`` will be raised. If an error
occurs during application of the profiles, a **PyCMSError** will be raised. occurs during application of the profiles, a ``PyCMSError`` will be raised.
If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS), If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS),
a **PyCMSError** will be raised. a ``PyCMSError`` will be raised.
This function applies an ICC transformation to im from ``inputProfile``'s This function applies an ICC transformation to im from ``inputProfile``'s
color space to ``outputProfile``'s color space using the specified rendering color space to ``outputProfile``'s color space using the specified rendering
@ -381,7 +381,7 @@ def getOpenProfile(profileFilename):
The PyCMSProfile object can be passed back into pyCMS for use in creating The PyCMSProfile object can be passed back into pyCMS for use in creating
transforms and such (as in ImageCms.buildTransformFromOpenProfiles()). transforms and such (as in ImageCms.buildTransformFromOpenProfiles()).
If ``profileFilename`` is not a valid filename for an ICC profile, a **PyCMSError** If ``profileFilename`` is not a valid filename for an ICC profile, a ``PyCMSError``
will be raised. will be raised.
:param profileFilename: String, as a valid filename path to the ICC profile :param profileFilename: String, as a valid filename path to the ICC profile
@ -410,11 +410,11 @@ def buildTransform(
image. image.
If the input or output profiles specified are not valid filenames, a If the input or output profiles specified are not valid filenames, a
**PyCMSError** will be raised. If an error occurs during creation of the ``PyCMSError`` will be raised. If an error occurs during creation of the
transform, a **PyCMSError** will be raised. transform, a ``PyCMSError`` will be raised.
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile`` If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a **PyCMSError** will be raised. (or by pyCMS), a ``PyCMSError`` will be raised.
This function builds and returns an ICC transform from the ``inputProfile`` This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile`` using the ``renderingIntent`` to determine what to do to the ``outputProfile`` using the ``renderingIntent`` to determine what to do
@ -493,13 +493,13 @@ def buildProofTransform(
obtained on the ``proofProfile`` device. obtained on the ``proofProfile`` device.
If the input, output, or proof profiles specified are not valid If the input, output, or proof profiles specified are not valid
filenames, a **PyCMSError** will be raised. filenames, a ``PyCMSError`` will be raised.
If an error occurs during creation of the transform, a **PyCMSError** If an error occurs during creation of the transform, a ``PyCMSError``
will be raised. will be raised.
If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile`` If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a **PyCMSError** will be raised. (or by pyCMS), a ``PyCMSError`` will be raised.
This function builds and returns an ICC transform from the ``inputProfile`` This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile``, but tries to simulate the result that would be to the ``outputProfile``, but tries to simulate the result that would be
@ -596,16 +596,16 @@ def applyTransform(im, transform, inPlace=False):
""" """
(pyCMS) Applies a transform to a given image. (pyCMS) Applies a transform to a given image.
If ``im.mode != transform.inMode``, a **PyCMSError** is raised. If ``im.mode != transform.inMode``, a ``PyCMSError`` is raised.
If ``inPlace`` is ``True`` and ``transform.inMode != transform.outMode``, a If ``inPlace`` is ``True`` and ``transform.inMode != transform.outMode``, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If ``im.mode``, ``transform.inMode`` or ``transform.outMode`` is not If ``im.mode``, ``transform.inMode`` or ``transform.outMode`` is not
supported by pyCMSdll or the profiles you used for the transform, a supported by pyCMSdll or the profiles you used for the transform, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while the transform is being applied, a **PyCMSError** If an error occurs while the transform is being applied, a ``PyCMSError``
is raised. is raised.
This function applies a pre-calculated transform (from This function applies a pre-calculated transform (from
@ -649,12 +649,12 @@ def createProfile(colorSpace, colorTemp=-1):
""" """
(pyCMS) Creates a profile. (pyCMS) Creates a profile.
If colorSpace not in ``["LAB", "XYZ", "sRGB"]``, a **PyCMSError** is raised. If colorSpace not in ``["LAB", "XYZ", "sRGB"]``, a ``PyCMSError`` is raised.
If using LAB and ``colorTemp`` is not a positive integer, a **PyCMSError** is If using LAB and ``colorTemp`` is not a positive integer, a ``PyCMSError`` is
raised. raised.
If an error occurs while creating the profile, a **PyCMSError** is raised. If an error occurs while creating the profile, a ``PyCMSError`` is raised.
Use this function to create common profiles on-the-fly instead of 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 having to supply a profile on disk and knowing the path to it. It
@ -699,8 +699,8 @@ def getProfileName(profile):
(pyCMS) Gets the internal product name for the given profile. (pyCMS) Gets the internal product name for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a 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 a ``PyCMSError`` is raised If an error occurs while trying to obtain the
name tag, a **PyCMSError** is raised. name tag, a ``PyCMSError`` is raised.
Use this function to obtain the INTERNAL name of the profile (stored 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 in an ICC tag in the profile itself), usually the one used when the
@ -740,9 +740,9 @@ def getProfileInfo(profile):
(pyCMS) Gets the internal product information for the given profile. (pyCMS) Gets the internal product information for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, If ``profile`` isn't a valid CmsProfile object or filename to a profile,
a **PyCMSError** is raised. a ``PyCMSError`` is raised.
If an error occurs while trying to obtain the info tag, a **PyCMSError** If an error occurs while trying to obtain the info tag, a ``PyCMSError``
is raised. is raised.
Use this function to obtain the information stored in the profile's Use this function to obtain the information stored in the profile's
@ -780,9 +780,9 @@ def getProfileCopyright(profile):
(pyCMS) Gets the copyright for the given profile. (pyCMS) Gets the copyright for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, a If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while trying to obtain the copyright tag, a **PyCMSError** If an error occurs while trying to obtain the copyright tag, a ``PyCMSError``
is raised. is raised.
Use this function to obtain the information stored in the profile's Use this function to obtain the information stored in the profile's
@ -808,10 +808,10 @@ def getProfileManufacturer(profile):
(pyCMS) Gets the manufacturer for the given profile. (pyCMS) Gets the manufacturer for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, a If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while trying to obtain the manufacturer tag, a If an error occurs while trying to obtain the manufacturer tag, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
Use this function to obtain the information stored in the profile's Use this function to obtain the information stored in the profile's
manufacturer tag. manufacturer tag.
@ -836,9 +836,9 @@ def getProfileModel(profile):
(pyCMS) Gets the model for the given profile. (pyCMS) Gets the model for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, a If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while trying to obtain the model tag, a **PyCMSError** If an error occurs while trying to obtain the model tag, a ``PyCMSError``
is raised. is raised.
Use this function to obtain the information stored in the profile's Use this function to obtain the information stored in the profile's
@ -865,9 +865,9 @@ def getProfileDescription(profile):
(pyCMS) Gets the description for the given profile. (pyCMS) Gets the description for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, a If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while trying to obtain the description tag, a **PyCMSError** If an error occurs while trying to obtain the description tag, a ``PyCMSError``
is raised. is raised.
Use this function to obtain the information stored in the profile's Use this function to obtain the information stored in the profile's
@ -894,10 +894,10 @@ def getDefaultIntent(profile):
(pyCMS) Gets the default intent name for the given profile. (pyCMS) Gets the default intent name for the given profile.
If ``profile`` isn't a valid CmsProfile object or filename to a profile, a If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
If an error occurs while trying to obtain the default intent, a If an error occurs while trying to obtain the default intent, a
**PyCMSError** is raised. ``PyCMSError`` is raised.
Use this function to determine the default (and usually best optimized) Use this function to determine the default (and usually best optimized)
rendering intent for this profile. Most profiles support multiple rendering intent for this profile. Most profiles support multiple
@ -940,7 +940,7 @@ def isIntentSupported(profile, intent, direction):
be used for others. Some profiles can only be used for certain be used for others. Some profiles can only be used for certain
rendering intents, so it's best to either verify this before trying rendering intents, so it's best to either verify this before trying
to create a transform with them (using this function), or catch the to create a transform with them (using this function), or catch the
potential **PyCMSError** that will occur if they don't support the modes potential ``PyCMSError`` that will occur if they don't support the modes
you select. you select.
:param profile: EITHER a valid CmsProfile object, OR a string of the :param profile: EITHER a valid CmsProfile object, OR a string of the