Create your digital portrait with Processing. | Irina Galkina | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Create your digital portrait with Processing.

teacher avatar Irina Galkina, Easy programming.

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.



    • 2.

      Introduction to Processing.


    • 3.

      Setting up project.


    • 4.

      Loading pixels.


    • 5.

      Drawing portrait.


  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Nowadays designers and artists became close to engineers and many works of art are made using digital technologies.

Processing one of the most popular platform for creating visual arts.

At this class we gonna to create program that creates amazing digital portrait from your photo.

And this program will hold only 20 lines of code.

In this class you'll learn:

  • how to download and setup Processing;
  • the structure of Processing's program;
  • the basic programming constructs;
  • how to add image to your program;
  • how to use images in Processing;
  • how to extract color from pixel;
  • how to pixelize images;

Meet Your Teacher

Teacher Profile Image

Irina Galkina

Easy programming.


Hi everyone! My name is Irina and I'm a programmer and a teacher.

One day I discovered word of programming and now as a programmer I work with such wonderful programming platforms as Java, Processing, Swift and I hope I get few more in the future!

Also I work as a teacher on programming online-classes. I really like to share my knowledge with other people and make something complicated easy to understand.

The programming is a area where your practical skills are very important and thats why I create simple and useful classes for everyone who wants to try themselves in programming.

As a teacher and a programmer I found out that the best way to learn programming is to start from something useful easy and enthralling, something that will be interesting for you t... See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro: Hello. My name is Serena and I am a programmer. The mirror, it's We live in very interesting time. When engineers became closer toe, artists and artists became closer to engineers, and many works of art are made using digital technologies. One of the technologist is protesting. Processing is a flexible stopped by a sketchbook and a language for learning how to call within the context of visual arts. As a programmer, I know says the most efficient way to loan something is practice. And at this class we're going to create useful and simple project with a beautiful results . We'll write simple programs in protesting that real holes on Lee salty lines off court and no special knowledge is needed. We will start from downloading protesting, and we will finish res completed program. 2. Introduction to Processing.: Hello, everyone. It's our first lesson. And are we going to download protesting? And for this reason, I gonna just to protesting the Orc. And here I just, like, download protesting option. And here you just need to select Windows, Lennox or Marcos and just selected. And ah, what? Downloading it started. Also, you can hair. You can do something nation here if you want. And now I just started my protesting, and here we can see our they e duration development environment. And here we just gonna type our coat in processing language and do some interesting stuff. So here we gonna write some coat. And now I want to explain what we're gonna do here, and we're going to create small program Small. It's about certain line off such lines off court. And by doing this, we're going to explore the basics off protesting and programming in general. So if you don't have programming experience, it's okay, cause we gonna do explain each line off coat s. So let's start right court and each processing program. No eso, Let's start, writes coat. And the first thing I want to say that each processing program is based on two blocks response is grounds for the one time when the program is just started and the 2nd 1 that runs over and over and over. When you're protesting program is running, so the first block is set of look, just type Avoid said that empty break its anything current briquettes and the 2nd 1 is a draw and to break its empty corner brackets. 3. Setting up project.: and here we can see his ministrations. What? We're going to the great of this class. You have program, and he would have picture off your off you or maybe off your friends. And we're going to create some kind of digital portrait for this photo. And as you can see, if this program is not so weak and there's just imagine what we're gonna do in our set a book, what we should do and vegetable, I need to said science or windows that are gonna use for my program and for this purpose is I do, based on the size off the image that I'm gonna use on my desktop. I have pictures that are gonna use here is kind of ported, and here I have dimensions and that's gonna be my size for being dope. So what I'm gonna do, I just wanna just type size five hundreds by 375 Size is preloaded protesting method that set up the size off windows that we're gonna use. I already can start my protesting program by present play, and here I can see the window. This is the size 500 by 375 also what I going to do with my program now I want to said big ground. So it gonna be background color for my year Window. As you can see now here is a kind of Cray. But I want to be black. So I just say's 255 and it's gonna be white color. So as size background is Pirlo that protesting message for setting background color for my window I can run and no Pichon seasons background is white. If you need more information about this myth that you can go to protesting side go toe the reference option and here you can find information about size, big ground and other mess is said to be gonna use No, I just need to at image to my program. I just think that I gonna do ease to add this image to my processing project. Here in sketch menu, we have ED file and you just need to select the pictures that you're going to use. I have my picture on my desktop protesting or port eight being gym and just pressed open. And now I need to create an object off or protesting this image for protesting images in protesting reuse Be image object Just I be image said name like I'm James. Why? I just said Thies, be image here not into top, not on draw Because I want to use easiest object e in my set up method and in my drawer mentor So I just said it over them all to be the accessible from each method. And here in my set of minute I want toe load my image tooth This object How can I do this? I just type I'm Gene Lo image again, Mrs from processing Hclibrary And here I just need to type name off the image Portray being G Now my image is loaded to my program and I can use it I can transform and I can get it won by a bomb by big sales and everything that I want to do 4. Loading pixels.: Now I go to use my image. I want to separate my image by big cells. Get surrendering pixel from my image and on the same place. I want to draw small ellipse with the same color as the pixel. So our goal now is to get random pixel from my picture. I know, said Dimension off my picture off. My picture is five hundreds by 375 so I know I need only one big still are now. And I want to get the dren doubly. I can imagine my picture in the table with rows and columns and on the coursing off each column and row. I have one pixel, so I need to set random excursion out for the column, and I need to set random Weicker Do not for the row and my X coordinate. My comb is definitely depends on the image weights, so I just type in X. Indeed, the basic genotype you can know more about the travel ties, basic type from my class job, one data types, but to sing briefly. It's just a teacher, so I just say that I want to have variable into juror of his name X and I wanted to be from zero toe image rates minus one from my image object, I can get wits. Uh, this property, it's we'll return. You may use the numbers. A maximum number of big cells. I was. It holds my picture and I need to get only one one random pixel From this I used random method with this very mature, um, and this method, it's actually not rejoins integer but float. And we needed toe kissed the integer just typing and break It's who is this friend of message? The same we're gonna do with the y coordinate. But here we're gonna use no sweets, definitely about height. So now we have the coal and zero and the most complicated. Think about images and protesting that we not getting a pig cells from image by X and y. But we're getting images pixels from image by orginal number. So we should get or little number from X and Y coordinates. And how can reduce this, uh, let's mentions that have Roe and Cole and we need to get the orginal number so the order number will be us. Assume from all rose that we have before our oh, and all elements that we have before our element in this rope. Let's just type it. It gonna be implications. Why I want to Blake and how many elements would have control? Of course it's the weeds, So multiply image REITs plus X. That means how many elements how many pixels have before our big so insist row we already loaded are have loaded our image instead of. But now we need to load. Image will mean it'll load pixels for our image because we're going to use excels, not image, but excels off this image. So I just need to beautiful load big cells. Message is that are going to load big sells for our image. 5. Drawing portrait.: eso No, I can't extract can get each pixels from my image and what I need to do now is to extract the color off the speak. Sell because one picture has only one color extracts a color em to draw elephants is ellipse is the same color and protesting. We need to extract each parameter off color so right parameter do parameter and gree parameter or separate Lee. So first of all I need to extract right now was extract the let now's the right the red part off the our car color. So float Brick throat is another data type and means that this stated IV's faulting point, you know, like one point for asylum in an astral eso for extracting grit. I have special method writ and I just get my image. Get pixels from my image and I get a big Sylvie special occasion which I already know. Location is a look, So once again A. Here we have array off pixels and we use our orginal number for each pixels to get this big cells. And from this big self, we get rate red parameter read, but office this color on direct I'm now let's just extract the color and green color. We can do it least this same methods. So blue car we can extract with Lou Method and green these green method. So now have all three components to compile our own color and draw ellipse be Siskel. Now it's time to use this color and did. Let's use it. Who is Mitt of Fuel? This medal is sets color for all future shapes but we're gonna draw in our dramatic So how it works for protesting we just sitting color and after that we use only this color for drawing all the shapes before drawing shape with another garner We should rest very few car color so there should be study All right, the green No. And the first parameter is one hungry This parliament there is about transparency, so we don't need to be a local transparent. So I just said Oh, transparent color eso We did everything that we need to draw this ellipse and the last time that we're gonna do easy Just use a lip Smith it and said parameters has made it just for me to said the start point for this ellipse and off course, it's gonna be X and white, because is that the same place from which you get out big sell. So in the same place, we're gonna draw What? Ellis? So I said X and y, and after that I need to set the size of Ellis. I needed to be. Maybe not so big. Just drive 10 by 10 and that everything we need to draw our digital portrayed. Let's see what we have on now You can see that we have our picture and it was oh, created with a kind of visit us big number off Phillips Ellipsis and each office l IBS has stroke. I don't know. I don't actually like this year, so I don't need my a Libs tohave stroke resists. I just involved nos drogue method. So all my end IDs will not have stroke. So, as I guess sees a result is all stroke is more paper appropriate and we have a kind of digital port trait. We don't have a lot of precision here, so how can we fix it? Actually you can set was the number off a Libs the size of toilets to be equals five soft that we will have our portrayed more detailed and also you can use different shapes, not on the lips. For your portrait. You can also use squares, maybe even triangles, so use your imagination and created digital board Great.