 Okay, so time for another image magic video. So I hope you saw my last video, you don't have to see it, but in case you missed it, image magic is one of my favorite programs. It is a, at the core it's a terminal interface for modifying images. So in this video I'm going to talk about doing some, just a variety of different things. You're going to need a whole lot if you want to do basic image manipulation. But my goal in this video for my purposes is, so I'm in this folder right now and I have two images here. I have an image magic wizard image and I also have a Chad head here. So what I'm going to do in this video is I'm going to take, my goal is I want to create an image with the Chad head on one side and the image magic wizard on the other. That's what I want to do. And it's pretty straightforward. Again, we're going to do this totally with the command line. So anyway, let's go ahead and get into it. Now I should say if you don't know, image magic is very good at creating canvases. So let's say we want to, just as an example, let's say we just want sort of a blank, not a blank file, but just a canvas of a certain dimension. Let me show you what that looks like. So to do that all you have to do is it's pretty simple. Run the convert command with the size option and you can give the size option some kind of dimension. So I'm going to give it 1920 by 1080 or whatever. So that's going to be the dimensions of the image and then you can just, what you want to do is say canvas and then colon and then the color that you want your canvas to be. So let's say I want it to be dark blue and then I'll give it a name for this file. So let's say out.png. Now once I run that, you're going to see that it is now created this blank file out.png. It's just nothing but a blank canvas. So here's what we're going to do. We're going to create a canvas and simultaneously put our two images on top of it. But we're going to have to do some more modifications before that, but let's just see what it looks like. So if you saw my last video, if you want to add different images, if you want to make a composite image, including multiple different images, it's pretty straightforward to do. You just give the name, let's say I want to add in Chadhead and then after Chadhead you put in composite. So if I run that, what's going to happen is that now this output, it's nearly all blank, but it's put this image into the top left corner. In the same way, I can actually go ahead and add in, you know, let's see, we'll put in imWizard. I'm actually going to put this up here so you can maybe see a little better. So I'm going to put in imWizard and then I'm going to put composite after that as well. Always have to put composite after the image input. Now once I run that, our output file is going to look like this. So you see there's the Chad image and there's the image magic wizard, which is humongous. Now the reason it looks like this is because image magic does not automatically resize images to fit, you know, the first input or something like that. It doesn't do any of that stuff. So if we want these things to fit on the image properly, all we have to do is resize them. Now that's actually something pretty easy to do. So we can just run convert and let's say we take the imWizard file and then you give it the resize option and we'll resize it to, so we want it to be, so we want it to be as tall as this image, let's say 1080p, but we don't really care about the first dimension. Now what you could do is give it some dimension here and then x and then 1080p, but you can just as easily delete, excuse me, you can just as easily delete that, give it blank and it will automatically resize it to meet that height. So I'm just going to say resize 1080p and I'm going to name it, you know, imResize or something like that. So once that happens, I'm going to have another file here, which as you can expect is just the image magic wizard, but it's now been shrunk to the appropriate size. Now we can do the same thing with the Chad image. So let's take the Chad head and notice that this is a lot smaller than I want. I want it to basically fill up half and I want the other image to fill up the other half or something like that. So I'm going to run Chad head and shrink it to that appropriate size and I'm going to put it in, let's say ChadResize.png. So now I have this file and it is now a, it's the same thing as the other file but it's a little bit bigger. So now what I'm going to do, so I'm going to go back to this command I have here and I'm going to change the input files to our resized file. So let's say ChadResize and I am resized I think is what I, yeah, that's what I named it. I'm going to get rid of that. So if I run that now and refresh this image, you're going to see that now both of these images are correctly, they're about at the right size but of course this isn't still, this still isn't exactly how we want it. We want one to be on one side and one to be on the other and that's something that's simple enough to fix. We actually did this in my last video and that is using the gravity option. So what you can do is you can say I want to add this image to a canvas but I want it to hug the left edge or the right edge. Now how you do that is right before we have ChadResize we can specify gravity and then we'll say west because we want to make sure that it's on the west side. Now it sort of already is but you know we'll just put it in for good measure. And then before the I am resize file, the wizards, I'm going to put gravity and then east. Now I'm going to run that and you will see that now we have these two images on separate sides of the file. It looks much, much more better. But it's not perfect. There are some things I want to change. For example, notice that because of how the Chad image actually looks, he's basically at the very edge of the image. I want him to be a little closer to the center. Now you can change that just as easily. So what you do is you can go to, let's see, I think you put it right before the image name. You can say, actually maybe it's after. I don't know, we'll find out. Active experimentation. What you can do is use the geometry option and the geometry option allows you to specify two different numbers of pixels to offset this by. Now I'm pretty sure the first one is a width. So let's say we'll add 150 pixels and we're going to keep this one a zero because this is going to be a height or the height of it and it's about at a fine height. So I'm going to run that again and hope that works. Did not work. I think that's because it does need to go after the Chad resize image name. Oops. So I'm going to put that in here. So yeah, Chad resize then geometry after that. Hopefully that works. Yes, that's exactly what I expected. Just the second time. I still expected it though. So yeah, and so now we have a much nicer image. We have these two images on the canvas. So that's pretty much what we want. We want this composite image that we, of course, we didn't have to do anything special for. We really just run this command and that's all we need. But I think I'll improve this. I think I'll use this for the thumbnail just again because I'm lazy. But I want to make this look a little prettier. So what I'm going to do is, so you do have the option of having just a dark blue canvas or a red canvas or any other canvas you want. But there are actually some other options in Image Magic. One of my favorite ones, if you just want sort of a bunch of, I don't know, colors or something like that is the plasma option. So if you say plasma and then you specify some kind of color like blue and run that, what that does is it actually sort of produces this random, this background randomness that sort of has its own feel to it. So you can specify multiple colors here. So let's say I say plasma, blue, and then purple. So it's going to take purple and blue as the input colors. And you'll see that that's how it ends up looking. And of course, we can make other modifications to this. Now, as we did in the last video, for example, I can swirl the image. That's a good thing to do. So right before, keep in mind, this is before we specify the other input images. So it has to be before the other input images. But I can put in here swirl 180 or something like that. So that is going to swirl that background plasma to give it sort of a, let's maximize this. Now, refresh it. You'll see now that it's sort of spinning around or something like that. So again, that's another little addition you can do. Now, I should say, I don't think I mentioned it in the last video, but what you can do, let's go back up, let's get rid of the swirl. And let's put the swirl actually at the very end just to see what that's going to look like. Now, if you get a feel for how image magic works, we're just like the order of the arguments you put them in is changing how image magic is processing them. Now, if we move swirl from after the plasma, or the actual plasma specification, if we move it to the very end, after the other input files and run it, you're going to see that what it actually does is, once it does it, is it's going to swirl the whole thing. So if you want to swirl particular arguments, this is some option you can do, but yeah, it looks, look at that guy, he's like totally chinless now. And yeah, anyway, so that should give you an idea of the kind of stuff you can do with it. So anyway, I think that's about it. We actually talked about a lot of stuff. So making canvases, again, compositing images and plasma and also readjusting where images appear in a composite. So I hope you learned something. If you have any other things that you want me to do, I can probably do them for image magic. But I will say again, as I said in the last video, there is a fantastic site, imagemagic.org slash capital U usage, which has guides to all of these things. For example, if you want to learn more about the canvas, making canvases and stuff, you can go to the canvas collection or canvas creation tab and it'll tell you with examples, all the kind of stuff you can make in the same way composing or compositing images and stuff like this. But anyway, so that's about it. So I hope you learned something and I'll see you guys next time.