 Hey everyone, welcome back to the Python Image Library module tutorial video series. I love saying that. In the last tutorial we were looking at image.putPixel. It lived inside of our image object that we created with the module. And I was also talking about getPixel and kind of relating those to getData, putData, and manipulating the image bit by bit. And I was talking eventually about pixel access objects, which are super duper cool. So this video I'm going to really kind of whip those all together, slap in the face a couple of times, whipity-bipity-bam. And I want to introduce to you guys pixel access objects. So what we do to actually create them as an object, first of all it's going to need a variable to live in. So I'll call mine pixel access object. And we take the image that we've already loaded, so lower case I image, not the module itself. And we call this load function on it, which does not take any arguments. And it's going to create this pixel access object for us. And what this is, is essentially a multi-dimensional list or an array that can be indexed with specific x and y coordinates, which of course refer to different positions and different locations on the image. Now this can be returned to us. We can of course retrieve information just by indexing like this. And we can of course set this information by like of course saying equal to something like a value. Which can be other types of colors, 0000, 255 for black, 255, 255, 255 for white, pretty much any color that we want. So that's why it's super convenient and super awesome. It essentially does all of the work that image.putPixel and image.getPixel would do just in an array for us and significantly faster. So that's what you should be using most of the time. Now this is new in version 1.1.6 for the image library image module. So if you aren't getting it to work, maybe you're going older version. I mean, I don't know. But hey, this is what we should be doing. And it's in version 1.1.6. That's all I know. Okay, so I'm going to do the same thing that I did in the last tutorial for x in range of width. And I'll actually do, actually I'll print out pixel access object x and x. I'm going to use the same value here. Now I'm going to run this. Hey, we've got all the white values. Eventually we're going to get to the middle of the Python image itself, like the logo here. And you can see we've got at the center with this a bunch of white. And then again, the other half of the image. And there it is. Okay. And now of course we can set this equal to something. Pixel access object equals 0, 0, 0, 2, 5, 5. Actually I'll make this red. So it's a little bit different from the last one. 2, 5, 5, 0, 0, 0 for all the red color and none of green and blue. Run this. Check it out. And there it is. We've got our red line all across our image. And we've done it rather than using the put pixel and get pixel functions. But now we're using this pixel access object, which we were able to create with a load function and work with due to indexing with our array and our list. So super cool, pretty simple. And really that's it. All I wanted to show you guys. Thank you so much for watching. I hope you're enjoying the series. I know I'm going a little bit fast, but this is simple stuff, right? It's this library, this whole module is a utility box. It's a toolkit. So going through it is pretty quick. There's nothing you have to really learn about it. It's just a matter of whipping out the tools, like wrench, screwdriver, scalpel, you know. All right, enough of me jabbering. I'll see you in the next tutorial.