|
|
@ -2263,10 +2263,10 @@ right = [[<span class="hljs-number">0.1</span>, <span class="hljs-number">0.6</s |
|
|
|
<Image>.show() |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><tuple/int> = <Image>.getpixel((x, y)) <span class="hljs-comment"># Returns a pixel.</span> |
|
|
|
<Image>.putpixel((x, y), <tuple/int>) <span class="hljs-comment"># Writes a pixel to image.</span> |
|
|
|
<Image>.putpixel((x, y), <tuple/int>) <span class="hljs-comment"># Writes a pixel to the image.</span> |
|
|
|
<ImagingCore> = <Image>.getdata() <span class="hljs-comment"># Returns a sequence of pixels.</span> |
|
|
|
<Image>.putdata(<list/ImagingCore>) <span class="hljs-comment"># Writes a sequence of pixels.</span> |
|
|
|
<Image>.paste(<Image>, (x, y)) <span class="hljs-comment"># Writes an image to image.</span> |
|
|
|
<Image>.paste(<Image>, (x, y)) <span class="hljs-comment"># Writes an image to the image.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="bash language-bash hljs"><2d_array> = np.array(<Image>) <span class="hljs-comment"># Converts greyscale image to NumPy array.</span> |
|
|
|
<3d_array> = np.array(<Image>) <span class="hljs-comment"># Converts color image to NumPy array.</span> |
|
|
|