File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2656,10 +2656,10 @@ from PIL import Image
2656
2656
2657
2657
``` python
2658
2658
< tuple / int > = < Image> .getpixel((x, y)) # Returns a pixel.
2659
- < Image> .putpixel((x, y), < tuple / int > ) # Writes a pixel to image.
2659
+ < Image> .putpixel((x, y), < tuple / int > ) # Writes a pixel to the image.
2660
2660
< ImagingCore> = < Image> .getdata() # Returns a sequence of pixels.
2661
2661
< Image> .putdata(< list / ImagingCore> ) # Writes a sequence of pixels.
2662
- < Image> .paste(< Image> , (x, y)) # Writes an image to image.
2662
+ < Image> .paste(< Image> , (x, y)) # Writes an image to the image.
2663
2663
```
2664
2664
2665
2665
``` bash
Original file line number Diff line number Diff line change 2263
2263
<Image>.show()
2264
2264
</ code > </ pre >
2265
2265
< pre > < code class ="python language-python hljs "> <tuple/int> = <Image>.getpixel((x, y)) < span class ="hljs-comment "> # Returns a pixel.</ span >
2266
- <Image>.putpixel((x, y), <tuple/int>) < span class ="hljs-comment "> # Writes a pixel to image.</ span >
2266
+ <Image>.putpixel((x, y), <tuple/int>) < span class ="hljs-comment "> # Writes a pixel to the image.</ span >
2267
2267
<ImagingCore> = <Image>.getdata() < span class ="hljs-comment "> # Returns a sequence of pixels.</ span >
2268
2268
<Image>.putdata(<list/ImagingCore>) < span class ="hljs-comment "> # Writes a sequence of pixels.</ span >
2269
- <Image>.paste(<Image>, (x, y)) < span class ="hljs-comment "> # Writes an image to image.</ span >
2269
+ <Image>.paste(<Image>, (x, y)) < span class ="hljs-comment "> # Writes an image to the image.</ span >
2270
2270
</ code > </ pre >
2271
2271
< pre > < code class ="bash language-bash hljs "> <2d_array> = np.array(<Image>) < span class ="hljs-comment "> # Converts greyscale image to NumPy array.</ span >
2272
2272
<3d_array> = np.array(<Image>) < span class ="hljs-comment "> # Converts color image to NumPy array.</ span >
You can’t perform that action at this time.
0 commit comments