Browse Source

Image

pull/46/head
Jure Šorn 5 years ago
parent
commit
0b2657e332
2 changed files with 4 additions and 4 deletions
  1. 4
      README.md
  2. 4
      index.html

4
README.md

@ -2656,10 +2656,10 @@ from PIL import Image
```python
<tuple/int> = <Image>.getpixel((x, y)) # Returns a pixel.
<Image>.putpixel((x, y), <tuple/int>) # Writes a pixel to image.
<Image>.putpixel((x, y), <tuple/int>) # Writes a pixel to the image.
<ImagingCore> = <Image>.getdata() # Returns a sequence of pixels.
<Image>.putdata(<list/ImagingCore>) # Writes a sequence of pixels.
<Image>.paste(<Image>, (x, y)) # Writes an image to image.
<Image>.paste(<Image>, (x, y)) # Writes an image to the image.
```
```bash

4
index.html

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

Loading…
Cancel
Save