 Okay, a while back I showed some different techniques different applications out there for grabbing screenshots of webpages And I believe one of them I showed was cutty capped which we're going to use today But then we're going to use convert which is part of the image magic package, which Will most likely be in your repositories if it's not already installed We're going to use that to crop and resize the image down to a thumbnail Of course, you can adjust this little code to work for different sizes depending on what you want for your thumbnail Cutty cat will probably not be installed by default. So just use your package manager to install it This is what it's out spelled C U T Y C A P T and we're going to say dash dash you are L and We're going to give it a URL URL equals and say quotations will say HTTP colon forward slash forward slash Filmsbychris.com And then I'll say dash dash out for the output file and we'll just say image dot PNG So we'll hit enter give it a second it goes out grabs the website takes a screenshot and saves it So now I can use display which is also part of the image magic package since we're about to use that and we're going to say Display our image PNG there we go We have our image PNG and I can scroll them down. You can see my page is a little long And it did load it loaded even the ads there loaded up the screenshots for the videos there Little off-center there, but for the most part it got the page pretty properly At this size here. I'm not going to go too much into cutting cap and how it works because there are other options But now we're going to take this and we're going to crop it first because as you can see It's a long picture, which we don't want for a thumbnail thumbnails tend to be either rectangular or slightly Real square or slightly rectangular, so we'll close that and I'm let's say we wanted a cropped screenshot first we'll say convert Our image dot PNG dash dash or say just dash resize And we'll say we'll resize the width to 720 and then we'll still have a Long image, so we're going to is we're going to crop it. We'll say crop it 720 by 480 and then you got to give it Offset, and we don't really want to offset it at all. We want to start at the top left corner So we're going to say zero zero and they'll give an output file. We'll say image dot crop our image underscore crop dot PNG by the way image magic Knows to look at file extensions, so if I wanted it to be a JPEG I could just say JPEG and it will convert to a JPEG or a bitmap BMP I'm just going to use a PNG here convert that and now I'll say display Our new image of image crop dot PNG and there it is it is the image that we had before resized and cropped So it's nice little screenshot there if you had a maybe a larger thumbnail That would be a real large thumb now if we wanted to we can do the same thing, but we can say something like 256 and then here we'll say 256 and I'll say probably 200 I'm guessing here and we'll call this thumb And we will display our image thumb There we go. I have a little thumbnail That I can use on web pages or in other applications Of course, I do want to mention I try to always mention this why use image magic. It will automatically override An image so let's say I wanted to redo this. I'll say 128 make it a little bit smaller I will say 128 and we'll say 100 here actually we'll make it 128. So we'll make it oops. I can end by accident 128 we'll make it a square Thumbnail 128 by 128 and you notice I'm still using image dot in an image underscore thumbnail dot PNG It does not ask if you want to override it just automatically overrides that image So keep that in mind so you don't accidentally override an image. You've already created Let's display that and you can see that I Have a smaller thumbnail. I did make it a little bit longer in Comparison to be forced so we're getting a little bit more of the screen there so instead of Dividing that in half and that in half I divide that in half and then a little less or yeah a little less than in half yes, yes and Giving us a longer image where before this little ad down here was cut off and it's now there So that is just using image. I mean this is a simple little tutorial I'm sure I've shown resizing and cropping with image magic before and I'm pretty sure I've shown cutty cap and other techniques to grab Websites before I just thought I'd show you throwing them together if you wanted to create thumbnails you could throw These two commands in a script may put it in a loop and it can grab a bunch of websites for you And give you a bunch of thumbnails. So anyway, I thank you for watching. I hope you enjoy this tutorial I hope you visit my website, which is films by Chris comm. That's Chris with a K. I hope that you have a great day