<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Emily</title>
    <description>The latest articles on DEV Community by Emily (@emilyworld).</description>
    <link>https://dev.to/emilyworld</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F383180%2Fe8157b62-c6d1-41bd-8505-78816769afae.jpeg</url>
      <title>DEV Community: Emily</title>
      <link>https://dev.to/emilyworld</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emilyworld"/>
    <language>en</language>
    <item>
      <title>Internal Communications Promoter for Organizations</title>
      <dc:creator>Emily</dc:creator>
      <pubDate>Tue, 26 May 2020 23:28:19 +0000</pubDate>
      <link>https://dev.to/emilyworld/internal-communications-promoter-for-organizations-497d</link>
      <guid>https://dev.to/emilyworld/internal-communications-promoter-for-organizations-497d</guid>
      <description>&lt;h1&gt;
  
  
  Here is my video
&lt;/h1&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/jV8ybmF5o9A"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;This program is for promoting internal communication of organizations, and also my final project for Code in Place 2020 by Stanford University.&lt;/p&gt;

&lt;p&gt;Firstly the program reads employee database which includes employee numbers, names and pictures this time.&lt;br&gt;
It then randomly creates groups of four, and giving group ID so the groups can use it as Zoom ID directly if they would like.&lt;br&gt;
The program shows your group number, group members names and employee pictures when the user inputs employee number.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why did I create this program?
&lt;/h1&gt;

&lt;p&gt;My manager asked me, "Do you often grab lunch or talk with our colleagues outside our team? Any close ones?", when I had 1-on-1 meeting.&lt;br&gt;
I answered "Not really." I have always thought about making connections/network outside company but have not taken that in account.&lt;br&gt;
He then recommended me to make connections within the company to easily collaborate with other divisions at the meeting.&lt;/p&gt;

&lt;p&gt;However, the problem was I did not know 'How' to connect with employees I do not work with.&lt;/p&gt;

&lt;p&gt;I have been thinking about that, and finally come up with this idea,&lt;br&gt;
'I can build a program by myself if there is no such tool in my company.'&lt;/p&gt;

&lt;p&gt;Additionally, all employees are apart because they have been working from home lately, and I have always wanted to create a platform so that people can virtually and mentally feel connected.&lt;/p&gt;

&lt;p&gt;I hope you enjoy my video, and feel free to comment if you have any.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>computerscience</category>
      <category>gui</category>
    </item>
    <item>
      <title>Internal Communication Promoter for Organizations</title>
      <dc:creator>Emily</dc:creator>
      <pubDate>Tue, 26 May 2020 22:50:14 +0000</pubDate>
      <link>https://dev.to/emilyworld/internal-communication-promoter-for-organizations-22pc</link>
      <guid>https://dev.to/emilyworld/internal-communication-promoter-for-organizations-22pc</guid>
      <description>

</description>
      <category>beginners</category>
      <category>python</category>
      <category>computerscience</category>
      <category>gui</category>
    </item>
    <item>
      <title>Image Functionality - What I learned from Stanford's Code in Place</title>
      <dc:creator>Emily</dc:creator>
      <pubDate>Mon, 11 May 2020 10:13:50 +0000</pubDate>
      <link>https://dev.to/emilyworld/image-functionality-what-i-learned-from-stanford-s-code-in-place-11em</link>
      <guid>https://dev.to/emilyworld/image-functionality-what-i-learned-from-stanford-s-code-in-place-11em</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d4tMo8m8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qaudq640fu9ey9mil1w4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d4tMo8m8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qaudq640fu9ey9mil1w4.jpg" alt="Filtered image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  This is exactly how Instagram started
&lt;/h1&gt;

&lt;p&gt;The founders of Instagram learned this image functionality when they were in Stanford’s introductory course, CS106A, and they found this filtering algorithm interesting. Not too long after that, they put the function into an app so that many people could use, and since the whole world loved it, now people across the globe know what Instagram is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an image consist of?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zPYo5AE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1ybx1dilubryg7fjkh8v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zPYo5AE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1ybx1dilubryg7fjkh8v.png" alt="from (x, y) axis to an actual image"&gt;&lt;/a&gt;&lt;br&gt;
An image is made of square pixels, and each pixel has x and y axis to coordinate one image. Each pixel has single color that is coded as 3 RGB (Red, Green, Blue) values.&lt;/p&gt;
&lt;h2&gt;
  
  
  What's SimpleImage?
&lt;/h2&gt;

&lt;p&gt;It is a library made by Nick Parlante from Stanford University, using Pillow library; extends Python’s functionality in terms of digital image processing. To use SimpleImage library, write this code on top of the program to import.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;from simpleimage import SimpleImage&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also find SimpleImage module here: &lt;a href="https://github.com/EmilyWorld/SimpleImage/blob/master/simpleimage.py"&gt;https://github.com/EmilyWorld/SimpleImage/blob/master/simpleimage.py&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Image Functionalities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read an image from a filename&lt;/strong&gt;: Put the filename of an image between parenthesis () so that the image will be stored in image variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;image = SimpleImage(filename)&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Display the image&lt;/strong&gt;: Use &lt;code&gt;.show()&lt;/code&gt; function to display the image stored in image variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;image.show()&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use ‘for-each’ loop to reach each pixel in the image:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjBzi3oB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnhgtzwsns9vzh0ssz51.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZjBzi3oB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qnhgtzwsns9vzh0ssz51.jpg" alt="Greenscreened dogs on Zoom"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is to apply the codes below the loop to all the pixels in the image. The variable ‘pixel’ can be any word each individual chooses, but make sure that it is easily recognizable when looking back after the program completion. (e.g. px ) This type of loop can deploy to Greenscreening, for example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_red&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SimpleImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;#your code here
&lt;/span&gt;        &lt;span class="n"&gt;average&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;green&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
        &lt;span class="c1"&gt;#See if this pixel is 'sufficiently' red
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;average&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;INTENSITY_THRESHOLD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;#If so, overwrite pixel in original image
&lt;/span&gt;            &lt;span class="c1"&gt;#corresponding pixel from the back image.
&lt;/span&gt;            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;
            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;green&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;average&lt;/span&gt;
            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;green&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;average&lt;/span&gt;
            &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;average&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use ‘nested’ for loop to address each pixel by its (x, y) coordination:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--85t-8Gtk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6s32l198g11z7rhjve9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--85t-8Gtk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t6s32l198g11z7rhjve9.jpg" alt="Reflected image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is used when &lt;strong&gt;(x, y) location is important&lt;/strong&gt; to process the program. There is no functional difference between for-each loop and nested for loop, except that in the nested for loop, the code has access to the (x, y) values of the pixel currently looking at. This type of loop can apply to mirroring images, for instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;make_reflection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SimpleImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;#Create new image to contain mirror reflection
&lt;/span&gt;    &lt;span class="n"&gt;reflection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SimpleImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;#loop over all the columns from x = 0
&lt;/span&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;#loop over all the rows from y = 0
&lt;/span&gt;        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="c1"&gt;#your code here
&lt;/span&gt;            &lt;span class="n"&gt;pixel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;reflection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;reflection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reflection&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access data inside a pixel&lt;/strong&gt;: To modify colors (RGB) and location (x, y), each pixel can be designated by using ‘dot.’ syntax. Each R, G, B value can range from 0 up to 255. If RGB values are (R, G, B) = (0, 0, 0), it shows the color white, and (R, G, B) = (255, 255, 255) results in the color black. However, the pixel’s location cannot be directly modified.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#Color properties
&lt;/span&gt;&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;red&lt;/span&gt;
&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;green&lt;/span&gt;
&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#Location properties
&lt;/span&gt;&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;
&lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access image size&lt;/strong&gt;: To access and change width and height of the image, the code below is used with ‘dot.’ syntax.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;image.width&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;code&gt;image.height&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create a blank image with a specified width and height&lt;/strong&gt;: This is used when creating mirror images, image collage, and other artistic projects starting from a blank canvas. To make a blank image that is 600 pixels width and 400 pixels height, the code is below.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;image = SimpleImage.blank(600, 400)&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
or&lt;br&gt;
&lt;strong&gt;&lt;code&gt;image = SimpleImage.blank(width=600, height=400)&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access (x, y) coordinates in a pixel:&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NVno-jH1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/875n86bu5hfyan0e1y3o.jpg" alt="shows the concept of get info about the image from (0,0)"&gt;
This is to make the program &lt;strong&gt;remember and store information&lt;/strong&gt; of the image in (x, y) coordinates level of all the pixels. x and y in (x, y) should be &lt;em&gt;integers&lt;/em&gt;.
In addition, the respective range is 0 ≧ x ≧ width-1, and 0 ≧ y ≧ height-1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;pixel = image.get_pixel(x, y)&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Specify the place of each pixel in the image&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5ruTYcp5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ouhjo1k78yw4jrhbyfjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5ruTYcp5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ouhjo1k78yw4jrhbyfjg.png" alt="shows the concept of placing pictures on 6 different positions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is to locate the value of a certain pixel in a new image by (x, y) coordinates.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;put_patch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;final_image&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PATCH_SIZE&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;#height of the image (patch)
&lt;/span&gt;        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PATCH_SIZE&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="c1"&gt;#width of the image
&lt;/span&gt;            &lt;span class="n"&gt;pixel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;#your code here
&lt;/span&gt;            &lt;span class="c1"&gt;#put the patch into 6 different locations
&lt;/span&gt;            &lt;span class="n"&gt;final_image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PATCH_SIZE&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;col&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PATCH_SIZE&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="c1"&gt;#in the case of putting the patch 
&lt;/span&gt;            &lt;span class="c1"&gt;# where it is or top left corner
&lt;/span&gt;            &lt;span class="n"&gt;final_image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_pixel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pixel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;final_image&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Thank you for reading
&lt;/h2&gt;

&lt;p&gt;Feel free to comment if you have any questions or requests.&lt;br&gt;
Have a great coffee break!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d6yPSzTJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6clsw82chyb0qeotfgr4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d6yPSzTJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6clsw82chyb0qeotfgr4.jpg" alt="Coffee with 'Thanks'"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>imagefunctionality</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
