From a996033079a5489503dc1ac375539dd6c900849c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 29 May 2015 14:59:54 +1000 Subject: [PATCH] Fixed various typos --- PIL/Image.py | 2 +- PIL/ImageCms.py | 12 ++++++------ PIL/JpegImagePlugin.py | 2 +- PIL/TiffImagePlugin.py | 6 +++--- Tests/test_image_resize.py | 2 +- Tests/test_imagedraw.py | 20 ++++++++++---------- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/PIL/Image.py b/PIL/Image.py index 274e7ee0e..1c95bfca0 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1810,7 +1810,7 @@ class Image(object): self.readonly = 0 self.pyaccess = None - # FIXME: the different tranform methods need further explanation + # FIXME: the different transform methods need further explanation # instead of bloating the method docs, add a separate chapter. def transform(self, size, method, data=None, resample=NEAREST, fill=1): """ diff --git a/PIL/ImageCms.py b/PIL/ImageCms.py index 6cd2f5d2d..ebf127df3 100644 --- a/PIL/ImageCms.py +++ b/PIL/ImageCms.py @@ -64,7 +64,7 @@ pyCMS 0.0.2 alpha Jan 6, 2002 - Added try/except statements arount type() checks of + Added try/except statements around type() checks of potential CObjects... Python won't let you use type() on them, and raises a TypeError (stupid, if you ask me!) @@ -123,8 +123,8 @@ FLAGS = { "NOTCACHE": 64, # Inhibit 1-pixel cache "NOTPRECALC": 256, "NULLTRANSFORM": 512, # Don't transform anyway - "HIGHRESPRECALC": 1024, # Use more memory to give better accurancy - "LOWRESPRECALC": 2048, # Use less memory to minimize resouces + "HIGHRESPRECALC": 1024, # Use more memory to give better accuracy + "LOWRESPRECALC": 2048, # Use less memory to minimize resources "WHITEBLACKCOMPENSATION": 8192, "BLACKPOINTCOMPENSATION": 8192, "GAMUTCHECK": 4096, # Out of Gamut alarm @@ -573,7 +573,7 @@ def applyTransform(im, transform, inPlace=0): This function applies a pre-calculated transform (from ImageCms.buildTransform() or ImageCms.buildTransformFromOpenProfiles()) to an image. The transform can be used for multiple images, saving - considerable calcuation time if doing the same conversion multiple times. + considerable calculation time if doing the same conversion multiple times. If you want to modify im in-place instead of receiving a new image as the return value, set inPlace to TRUE. This can only be done if @@ -858,7 +858,7 @@ def getDefaultIntent(profile): If an error occurs while trying to obtain the default intent, a PyCMSError is raised. - Use this function to determine the default (and usually best optomized) + Use this function to determine the default (and usually best optimized) rendering intent for this profile. Most profiles support multiple rendering intents, but are intended mostly for one type of conversion. If you wish to use a different intent than returned, use @@ -914,7 +914,7 @@ def isIntentSupported(profile, intent, direction): see the pyCMS documentation for details on rendering intents and what they do. - :param direction: Integer specifing if the profile is to be used for input, + :param direction: Integer specifying if the profile is to be used for input, output, or proof INPUT = 0 (or use ImageCms.DIRECTION_INPUT) diff --git a/PIL/JpegImagePlugin.py b/PIL/JpegImagePlugin.py index e15042504..5cae90073 100644 --- a/PIL/JpegImagePlugin.py +++ b/PIL/JpegImagePlugin.py @@ -4,7 +4,7 @@ # # JPEG (JFIF) file handling # -# See "Digital Compression and Coding of Continous-Tone Still Images, +# See "Digital Compression and Coding of Continuous-Tone Still Images, # Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1) # # History: diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index ad085451b..f89c5b784 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -294,7 +294,7 @@ class ImageFileDirectory(collections.MutableMapping): def named(self): """ - Returns the complete tag dictionary, with named tags where posible. + Returns the complete tag dictionary, with named tags where possible. """ from PIL import TiffTags result = {} @@ -749,7 +749,7 @@ class TiffImageFile(ImageFile.ImageFile): # # Rearranging for supporting byteio items, since they have a fileno # that returns an IOError if there's no underlying fp. Easier to - # dea. with here by reordering. + # deal with here by reordering. if Image.DEBUG: print("have getvalue. just sending in a string from getvalue") n, err = decoder.decode(self.fp.getvalue()) @@ -985,7 +985,7 @@ class TiffImageFile(ImageFile.ImageFile): # Write TIFF files # little endian is default except for image modes with -# explict big endian byte-order +# explicit big endian byte-order SAVE_INFO = { # mode => rawmode, byteorder, photometrics, diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py index 414758529..d59f8ba14 100644 --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -54,7 +54,7 @@ class TestImagingCoreResize(PillowTestCase): # Make an image with one colored pixel, in one channel. # When resized, that channel should be the same as a GS image. # Other channels should be unaffected. - # The R and A channels should not swap, which is indicitive of + # The R and A channels should not swap, which is indicative of # an endianness issues. samples = { diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py index 3b9919834..a1ed20a3a 100644 --- a/Tests/test_imagedraw.py +++ b/Tests/test_imagedraw.py @@ -300,32 +300,32 @@ class TestImageDraw(PillowTestCase): img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 5, 14, 5), BLACK, 2) self.assert_image_equal( - img, expected, 'line straigth horizontal normal 2px wide failed') + img, expected, 'line straight horizontal normal 2px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_horizontal_w2px_inverted.png')) expected.load() img, draw = self.create_base_image_draw((20, 20)) draw.line((14, 5, 5, 5), BLACK, 2) self.assert_image_equal( - img, expected, 'line straigth horizontal inverted 2px wide failed') + img, expected, 'line straight horizontal inverted 2px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_horizontal_w3px.png')) expected.load() img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 5, 14, 5), BLACK, 3) self.assert_image_equal( - img, expected, 'line straigth horizontal normal 3px wide failed') + img, expected, 'line straight horizontal normal 3px wide failed') img, draw = self.create_base_image_draw((20, 20)) draw.line((14, 5, 5, 5), BLACK, 3) self.assert_image_equal( - img, expected, 'line straigth horizontal inverted 3px wide failed') + img, expected, 'line straight horizontal inverted 3px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_horizontal_w101px.png')) expected.load() img, draw = self.create_base_image_draw((200, 110)) draw.line((5, 55, 195, 55), BLACK, 101) self.assert_image_equal( - img, expected, 'line straigth horizontal 101px wide failed') + img, expected, 'line straight horizontal 101px wide failed') def test_line_h_s1_w2(self): self.skipTest('failing') @@ -344,32 +344,32 @@ class TestImageDraw(PillowTestCase): img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 5, 5, 14), BLACK, 2) self.assert_image_equal( - img, expected, 'line straigth vertical normal 2px wide failed') + img, expected, 'line straight vertical normal 2px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_vertical_w2px_inverted.png')) expected.load() img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 14, 5, 5), BLACK, 2) self.assert_image_equal( - img, expected, 'line straigth vertical inverted 2px wide failed') + img, expected, 'line straight vertical inverted 2px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_vertical_w3px.png')) expected.load() img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 5, 5, 14), BLACK, 3) self.assert_image_equal( - img, expected, 'line straigth vertical normal 3px wide failed') + img, expected, 'line straight vertical normal 3px wide failed') img, draw = self.create_base_image_draw((20, 20)) draw.line((5, 14, 5, 5), BLACK, 3) self.assert_image_equal( - img, expected, 'line straigth vertical inverted 3px wide failed') + img, expected, 'line straight vertical inverted 3px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_vertical_w101px.png')) expected.load() img, draw = self.create_base_image_draw((110, 200)) draw.line((55, 5, 55, 195), BLACK, 101) self.assert_image_equal(img, expected, - 'line straigth vertical 101px wide failed') + 'line straight vertical 101px wide failed') expected = Image.open(os.path.join(IMAGES_PATH, 'line_vertical_slope1px_w2px.png')) expected.load()