Bill Rosener: Oh, this is Dr. Bell. Welcome back in this video you learn how to use the image processing script and adobe Photoshop and Powershell to save you a lot of time when you need to make similar changes to multiple images. Let's just assume I've got an image here. But
Bill Rosener: let's assume we maybe had 10 images or more, and I want to resize these. I could come right up here to image.
Bill Rosener: I could go to image size. I could enter a new width.
Bill Rosener: say 600
Bill Rosener: 400, maybe change the resolution and
Bill Rosener: hit okay and save it. What if I've got 10 images or 100 images. Now, I'm gonna go ahead and show you how to do that. So the very 1st step you want to do is I get some images. So if you press here on the assignment 18, come over here. Assignment 18 subdirectory. I've got 10 images here. Just simply go ahead and click on each one of these and save them.
Bill Rosener: Okay, I've already got these images saved. So if I take a look here.
Bill Rosener: I've actually I'm going to be showing you a couple of other ones, so I've got them saved once in a folder called Bowls one. If I take a look here, I put my cursor on top of it. I can see it's 750, but I'm not sure if you saw that there 750 by 500, if that's not popping up for you to simply go ahead and right click on, image, go to properties.
Bill Rosener: go to details, and I can see, sure enough, it's 750 pixels in width, 500 pixels and height.
Bill Rosener: Okay? And then again, if you once, why don't you? If you once got these all saved. Once you go ahead and create a backup just in case you mess up there. So I've actually got involved one.
Bill Rosener: Here's polls, too, the exact same thing.
Bill Rosener: and we've even got a backup just in case there.
Bill Rosener: So here's Paul's 1.
Bill Rosener: Okay. So again, other, what you could do is come in here and do them one at a time. But if you got hundreds of images, this can get a very matte, very labor intensive there. So a quick approach to resizing images. And there's actually a lot of other transformations you can do is using the image processor. And to do that, come right down here to a file.
Bill Rosener: go to scripts and choose image processor file scripts. Image processor here in a W. Photoshop.
Bill Rosener: And the very 1st step you're gonna want to do is simply go ahead and select your folder. Mine is already being selected here.
Bill Rosener: I've got it on balls, one, so I'm just on the desktop, and a folder called 8 10.th I've got balls. One.
Bill Rosener: Then you're gonna want to go ahead and specify a width. I'm gonna go with 600, and I'm gonna go 400 and the height, if I wanted to, I could be also saving these in Psd, I could be saving a tip file, etc. But I'm just gonna do this one thing, so I'll specify the folder.
Bill Rosener: I'll specify
Bill Rosener: this new size 600 by 400, and then I can simply come right up here and run.
Bill Rosener: and it's going to take each one of these images, open it up, resize it, and then it's actually going to be saving it in a separate folder.
Bill Rosener: So hopefully, we're should be getting pretty close here.
Bill Rosener: 8, 9,
Bill Rosener: and there we go.
Bill Rosener: Okay. So now
Bill Rosener: it has created a separate folder in that same area. It's now called Jpeg, and if I go ahead and put my cursor on this, I can see it's 600 by 400. And again, if you're not just come right down here to a properties.
Bill Rosener: go to details, and sure enough, I can see it's 600
Bill Rosener: and width 400 and height.
Bill Rosener: Okay, let me show you another way that you can resize images. And this is a very common approach.
Bill Rosener: and it's gonna be using a Powershell and image magic to get Powershell available. I'm just gonna press right here on this. Looks like I am
Bill Rosener: little zoom tool
Bill Rosener: magnifying glass. And I'm just gonna type in our
Bill Rosener: so and I'm not sure if this is installed on every computer or not. So if it's not, just go ahead and not follow along here.
Bill Rosener: So that's going to open up Powershell. I'm now going to come along and come right up here. I'm going to right click here and copy the address.
Bill Rosener: We come back to our Powershell.
Bill Rosener: I'm gonna type CD, which is gonna Change Directory. I'm gonna paste and
Bill Rosener: do a DIR, which is directory, and I can see I've got the 10 balls there.
Bill Rosener: Okay, so now, to save me. So a little time here, let me go ahead and throw show you a couple of other options here and again, this is going to be used in some software.
Bill Rosener: This 1st couple are using image magic.
Bill Rosener: Here it is. I just gone into Google, and you can see image magic invoke from the command line. His magic is a free and open source. So this is what a lot of people are going to use if they need to make transformations to multiple images there.
Bill Rosener: So what I'm gonna do is. Let's assume this 1st command. Actually, that is just a comma. I can grab it if I want. But what is it's gonna do is it's gonna take all the asterisks, stands for all, all images, and with J. Jpeg, and then reformat them to Png.
Bill Rosener: So this one command and go ahead and copy that
Bill Rosener: come right back to a Powershell. I'm going to paste
Bill Rosener: then how at the enter key.
Bill Rosener: and it's gonna take every single one of these images
Bill Rosener: and convert it into a png. So if I do a directory listing now, I can see I've got bowl one dot jpeg and bowl wand Dot Png, and if I came over here. Sure enough, I've doubled
Bill Rosener: the number of images there.
Bill Rosener: Okay, let's assume I wanted to resize these images so I could. I just showed you how to do that using
Bill Rosener: adobe Photoshop. Now let's go ahead and just use image magic. I'm gonna copy that
Bill Rosener: come right back over here and paste.
Bill Rosener: I tell you what, before I hit the inter key, let me just show you here. If I put my cursor on one of these that ends with a Png.
Bill Rosener: You can see. Sure enough, it's 750 by 500. Okay.
Bill Rosener: And now let me go ahead and hit. Enter
Bill Rosener: and wait just a second or 2,
Bill Rosener: and there we go. And now, actually, if I even did a directory listing, you're gonna see that the size has decreased on these balls because they're now smaller, or if I come over here to bowls too, put my cursor on one of these that ends with a P. And whoops.
Bill Rosener: Let me just make sure. Here, there, all that ended with Png.
Bill Rosener: Let me hit refresh. Let me come back up here a level.
Bill Rosener: Come back to poll 2.
Bill Rosener: And now we go. Okay. So now, when I put my cursor on one of these that ends with Png, or if I come down here to properties. I can now see
Bill Rosener: it is 600 pixels in width by 400 pixels in height.
Bill Rosener: I'll tell you what. Let me go ahead and
Bill Rosener: delete these Png files. You may or may not have Powershell installed, and you probably definitely don't have that software and image magic. But you should be able to follow along with this last step.
Bill Rosener: Take a look at I've got these 10 images here.
Bill Rosener: I'll start with ball.
Bill Rosener: Let's assume we want to rename these. Yeah, I could come up here and go right click and rename and do that one at a time. But surely there's a fast way, and there is, and that's going to be used in that Powershell here. And what this is going to do is I'm going to rename every one of them rather than just being bowl. Let's assume I want to have them say wooden bowl.
Bill Rosener: And so this is going to get
Bill Rosener: get the child item. So it's going to work with. Every that's the asterisk is going to be all all Jpegs, and then for each one of them it's going to take bowl and rename it to wind bowl. So I'm just going to go ahead and grab this kid right here.
Bill Rosener: copy it
Bill Rosener: and back here to a Powershell. Let me do a directory listing, because I've only got 10 now, and I'm going to do a paste
Bill Rosener: and hit enter and do a dir. And sure enough, just like that I've renamed all those images, and so now they're more than just ball. It's wooden bowl there
Bill Rosener: and take a look at that code one more time. Here.
Bill Rosener: I've
Bill Rosener: one little mistake, and this won't work. So get child. Item asterix dot Jpeg, make sure you got your spaces before and after that vertical bar
Bill Rosener: dollar sign underscore space dollar sign underscore. Just take a closer look at that, and if you copy that and paste it, your code should work just as well.
Bill Rosener: well, hopefully, in this video.
Bill Rosener: you learned how to
Bill Rosener: resize images. I've showed you a couple of approaches, one using adobe Photoshop and the other using Powershell hopefully to save you a lot of time, possibly reformatting, resizing, renaming files there.
Bill Rosener: using the script as opposed to manually doing that more than a time. Well, I'll catch you next. Video. Thanks a lot. Bye.