Skip to content

Commit 1ed0dc3

Browse files
authored
Fixed typo (#9922)
1 parent 416b7a8 commit 1ed0dc3

11 files changed

Lines changed: 28 additions & 28 deletions

docs/handbook/image-file-formats.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ images. Seeking to later frames in a ``P`` image will change the image to
237237
``P`` mode images are changed to ``RGB`` because each frame of a GIF may contain
238238
its own individual palette of up to 256 colors. When a new frame is placed onto a
239239
previous frame, those colors may combine to exceed the ``P`` mode limit of 256
240-
colors. Instead, the image is converted to ``RGB`` handle this.
240+
colors. Instead, the image is converted to ``RGB`` to handle this.
241241

242242
If you would prefer the first ``P`` image frame to be ``RGB`` as well, so that
243243
every ``P`` frame is converted to ``RGB`` or ``RGBA`` mode, there is a setting
@@ -346,7 +346,7 @@ following options are available::
346346
**palette**
347347
Use the specified palette for the saved image. The palette should
348348
be a bytes or bytearray object containing the palette entries in
349-
RGBRGB... form. It should be no more than 768 bytes. Alternately,
349+
RGBRGB... form. It should be no more than 768 bytes. Alternatively,
350350
the palette can be passed in as an
351351
:py:class:`PIL.ImagePalette.ImagePalette` object.
352352

@@ -1307,7 +1307,7 @@ The :py:meth:`~PIL.Image.Image.save` method can take the following keyword argum
13071307
.. versionadded:: 6.1.0
13081308

13091309
Added support for signed types (e.g. ``TIFF_SIGNED_LONG``) and multiple values.
1310-
Multiple values for a single tag must be to
1310+
Multiple values for a single tag must be passed to
13111311
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2` as a tuple and
13121312
require a matching type in
13131313
:py:attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype` tagtype.

docs/handbook/tutorial.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ RGBA image and also using it as the mask would paste the opaque portion
233233
of the image but not its transparent background.
234234

235235
The Python Imaging Library also allows you to work with the individual bands of
236-
an multi-band image, such as an RGB image. The split method creates a set of
237-
new images, each containing one band from the original multi-band image. The
238-
merge function takes a mode and a tuple of images, and combines them into a new
236+
a multi-band image, such as an RGB image. The split method creates a set of new
237+
images, each containing one band from the original multi-band image. The merge
238+
function takes a mode and a tuple of images, and combines them into a new
239239
image. The following sample swaps the three bands of an RGB image:
240240

241241
Splitting and merging bands
@@ -259,15 +259,15 @@ Geometrical transforms
259259
The :py:class:`PIL.Image.Image` class contains methods to
260260
:py:meth:`~PIL.Image.Image.resize` and :py:meth:`~PIL.Image.Image.rotate` an
261261
image. The former takes a tuple giving the new size, the latter the angle in
262-
degrees counter-clockwise.
262+
degrees counterclockwise.
263263

264264
Simple geometry transforms
265265
^^^^^^^^^^^^^^^^^^^^^^^^^^
266266

267267
::
268268

269269
out = im.resize((128, 128))
270-
out = im.rotate(45) # degrees counter-clockwise
270+
out = im.rotate(45) # degrees counterclockwise
271271

272272
.. image:: rotated_hopper_90.webp
273273
:align: center

docs/handbook/writing-your-own-image-plugin.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pillow decodes files in two stages:
2727

2828
An image plugin should contain a format handler derived from the
2929
:py:class:`PIL.ImageFile.ImageFile` base class. This class should provide an
30-
``_open`` method, which reads the file header and set at least the internal
30+
``_open`` method, which reads the file header and sets at least the internal
3131
``_size`` and ``_mode`` attributes so that :py:attr:`~PIL.Image.Image.mode` and
3232
:py:attr:`~PIL.Image.Image.size` are populated. To be able to load the file,
3333
the method must also create a list of ``tile`` descriptors, which contain a
@@ -377,7 +377,7 @@ The setup function needs to call ``PyImaging_DecoderNew`` or
377377

378378
**pulls_fd**/**pushes_fd**
379379
If the decoder has ``pulls_fd`` or the encoder has ``pushes_fd`` set to 1,
380-
``state->fd`` will be a pointer to the Python file like object. The codec may
380+
``state->fd`` will be a pointer to the Python file-like object. The codec may
381381
use the functions in ``codec_fd.c`` to read or write directly with the file
382382
like object rather than have the data pushed through a buffer.
383383

@@ -436,7 +436,7 @@ Python-based file codec:
436436
``_pushes_fd`` property) is set to ``True``, then ``decode`` and ``encode``
437437
will only be called once. In the decoder, ``self.fd`` can be used to access
438438
the file-like object. Using this will provide a codec with more freedom, but
439-
that freedom may mean increased memory usage if entire file is held in
439+
that freedom may mean increased memory usage if the entire file is held in
440440
memory at once by the codec.
441441

442442
In ``decode``, once the data has been interpreted, ``set_as_raw`` can be

docs/reference/Image.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ This resizes the given image from ``(width, height)`` to ``(width/2, height/2)``
222222

223223
.. automethod:: PIL.Image.Image.rotate
224224

225-
This rotates the input image by ``theta`` degrees counter clockwise::
225+
This rotates the input image by ``theta`` degrees counterclockwise::
226226

227227
from PIL import Image
228228

229229
with Image.open("hopper.jpg") as im:
230230

231-
# Rotate the image by 60 degrees counter clockwise
231+
# Rotate the image by 60 degrees counterclockwise
232232
theta = 60
233-
# Angle is in degrees counter clockwise
233+
# Angle is in degrees counterclockwise
234234
im_rotated = im.rotate(angle=theta)
235235

236236
.. automethod:: PIL.Image.Image.save
@@ -272,7 +272,7 @@ Instances of the :py:class:`Image` class have the following attributes:
272272

273273
The filename or path of the source file. Only images created with the
274274
factory function ``open`` have a filename attribute. If the input is a
275-
file like object, the filename attribute is set to an empty string.
275+
file-like object, the filename attribute is set to an empty string.
276276

277277
.. py:attribute:: Image.format
278278
:type: Optional[str]
@@ -333,7 +333,7 @@ Instances of the :py:class:`Image` class have the following attributes:
333333
Plugins may leave this attribute undefined if they don't support loading
334334
animated images, even if the given format supports animated images.
335335

336-
Given that this attribute is not present for all images use
336+
Given that this attribute is not present for all images, use
337337
``getattr(image, "is_animated", False)`` to check if Pillow is aware of multiple
338338
frames in an image regardless of its format.
339339

@@ -348,7 +348,7 @@ Instances of the :py:class:`Image` class have the following attributes:
348348
Plugins may leave this attribute undefined if they don't support loading
349349
animated images, even if the given format supports animated images.
350350

351-
Given that this attribute is not present for all images use
351+
Given that this attribute is not present for all images, use
352352
``getattr(image, "n_frames", 1)`` to check the number of frames that Pillow is
353353
aware of in an image regardless of its format.
354354

docs/reference/ImageCms.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ can be easily displayed in a chromaticity diagram, for example).
221221

222222
The value is in the format ``((x, y, Y), (x, y, Y), (x, y, Y))``, if available.
223223

224-
.. py:attribute:: chromatic_adaption
224+
.. py:attribute:: chromatic_adaptation
225225
:type: tuple[tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]], tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]]] | None
226226

227-
The chromatic adaption matrix converts a color measured using the
227+
The chromatic adaptation matrix converts a color measured using the
228228
actual illumination conditions and relative to the actual adopted
229229
white, to a color relative to the PCS adopted white, with
230230
complete adaptation from the actual adopted white chromaticity to
@@ -316,21 +316,21 @@ can be easily displayed in a chromaticity diagram, for example).
316316
.. py:attribute:: red_primary
317317
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
318318

319-
The XYZ-transformed of the RGB primary color red (1, 0, 0).
319+
The XYZ-transform of the RGB primary color red (1, 0, 0).
320320

321321
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
322322

323323
.. py:attribute:: green_primary
324324
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
325325

326-
The XYZ-transformed of the RGB primary color green (0, 1, 0).
326+
The XYZ-transform of the RGB primary color green (0, 1, 0).
327327

328328
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
329329

330330
.. py:attribute:: blue_primary
331331
:type: tuple[tuple[float, float, float], tuple[float, float, float]] | None
332332

333-
The XYZ-transformed of the RGB primary color blue (0, 0, 1).
333+
The XYZ-transform of the RGB primary color blue (0, 0, 1).
334334

335335
The value is in the format ``((X, Y, Z), (x, y, Y))``, if available.
336336

docs/reference/ImageColor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The ImageColor module supports the following string formats:
4747

4848
* Common HTML color names. The :py:mod:`~PIL.ImageColor` module provides some
4949
140 standard color names, based on the colors supported by the X Window
50-
system and most web browsers. color names are case insensitive. For example,
50+
system and most web browsers. Color names are case insensitive. For example,
5151
``red`` and ``Red`` both specify pure red.
5252

5353
Functions

docs/reference/ImageGrab.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ or the clipboard to a PIL image memory.
7373
or None if the clipboard does not contain image data or filenames.
7474
Note that if a list is returned, the filenames may not represent image files.
7575

76-
On Mac, an image,
76+
On macOS, an image,
7777
or None if the clipboard does not contain image data.
7878

7979
On Linux, an image.

docs/reference/TiffTags.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ metadata tag numbers, names, and type information.
6767
'ImageDescription'
6868

6969
This dictionary contains a superset of the tags in :py:data:`~PIL.TiffTags.TAGS_V2`, common
70-
EXIF tags, and other well known metadata tags.
70+
EXIF tags, and other well-known metadata tags.
7171

7272
.. py:data:: PIL.TiffTags.TYPES
7373
:type: dict

docs/reference/c_extension_debugging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
C extension debugging on Linux, with GBD/Valgrind
1+
C extension debugging on Linux, with GDB/Valgrind
22
=================================================
33

44
Install the tools

src/PIL/Image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ def rotate(
24752475
copy of this image, rotated the given number of degrees counter
24762476
clockwise around its centre.
24772477
2478-
:param angle: In degrees counter clockwise.
2478+
:param angle: In degrees counterclockwise.
24792479
:param resample: An optional resampling filter. This can be
24802480
one of :py:data:`Resampling.NEAREST` (use nearest neighbour),
24812481
:py:data:`Resampling.BILINEAR` (linear interpolation in a 2x2

0 commit comments

Comments
 (0)