From the course: Photoshop 2024 Essential Training
Creating animated GIFs - Photoshop Tutorial
From the course: Photoshop 2024 Essential Training
Creating animated GIFs
- [Instructor] In the next few minutes, we're going to see how easy it is to rotate this bee around the flower and then export it as an animated GIF. We can see that this document has three different layers. We've got the background, as well as the flower and the bee. There are also some guides in this document, so I'll choose View, and then Show, and then Guides. Now, this document is 4,000 by 4,000 pixels, so the center point is 2,000 by 2,000 pixels, and we're just going to keep that in mind. In just a moment, we'll use that number. But in order to make a duplicate of the bee, I'll use Command + J. That will duplicate that layer. And then I need to transform this, so I'll use Command + T on Mac, Control + T on Windows. But we need to move the reference point, because otherwise, the bee is just going to rotate around itself. I'll use Command + Z to undo that. And then if the reference point isn't showing, be sure to enable it in the options bar. Now, I need to start dragging the reference point down to the center of the image, but sometimes, it's difficult to get it to the exact position that you want, but we can use the X and Y options in the options bar after we start dragging it in order to enter in the exact amount we want. And I want to place this at 2,000 by 2,000 pixels. Now, I don't want to have to type that in each time, so I'll select it, and use Command + C in order to just copy that to the clipboard. Now, when I start rotating the bee, it's going to rotate around the center, and if I hold down the Shift key, we can snap it to 15 degrees. Alright, let's apply that rotation, and now I'm going to make a duplicate of both bee layers. So I'll select them in the Layers panel, and then use Command + J in order to duplicate them. I'll use Command + T for free transform, again, start dragging the reference point, and then we can enter in those values of 2,000 by using Command + V in order to paste them in the X and Y options. Alright, let's rotate those. I'm going to hold down the Shift key, and I'm going to snap it to 30 degrees, and then apply that. Alright, let's make two more bees. I'll use Command + J on Mac, Control + J on Windows, and then Command + T in order to transform those. We'll start dragging down that reference point, and then we can enter in those values, so 2,000 by 2,000. Alright, let's go ahead and rotate those, again, with the Shift key, snapping it to 30 degrees, and then choosing Done. Now that we have six bees, we can select all of the bee layers in the Layers panel, and let's put them in a group in order to tidy up the panel. So I'll use Command + G to do that, or you can drag 'em down to the folder icon at the bottom of the Layers panel. To duplicate the group, we can use that same shortcut, Command + J. So when a layer is targeted, Photoshop would duplicate the layer, but when a group is targeted, it will duplicate the group. Okay, we'll use Command + T in order to free transform. Again, we're going to want to transform around the center, so we will paste in those values, and then hold down the Shift key in order to constrain it, and we're going to rotate it to 90 degrees and apply that. Now we can select both of the groups in the Layers panel and use Command + J in order to duplicate them and Command + T in order to rotate, drag the reference point, and then enter in the values. This time, all we need to do is rotate them until they snap back at zero degrees. Excellent, let's apply that, and then we'll want to show our Timeline panel. If it's not visible, you can use the Window menu and then choose Timeline. Now, your Timeline panel might look a little bit different. There might be a button here that says Create video timeline or animation timeline. If so, use the arrow to choose create frame animation, and then you may need to click it to actually create the frame animation. In order to create our animation, we'll need to select all of our layers. First, I'll convert the background into a layer, and then choose Select and All Layers. With all layers selected, I'll use the flyout menu on the right side of the timeline and choose Make Frames From Layers. So Photoshop has automatically put each layer in the document on its own frame. Frame one is the background, then the flower, then we have all the bees as they rotate around, which is pretty hard to see with the transparency. But what I need to do is I need to copy both Layer 0 and the flower, so the background and the flower, and I need to make them consistent across all of the frames. So I'll target the first frame in the timeline, and then I'm going to select Layer 0 and the flower layer and make them both visible. And then from the flyout menu, I'll choose Match Layer Across Frames. I'll match the position, the visibility, as well as the layer style, and now we can see that each frame has the flower in the background, and then these all have the bees. So the first two frames that don't have the bees, we don't need those, so I'll hold in the Command key on Mac, Control key on Windows, and then click on the trash icon in order to delete those two frames. I'll click on the play button in order to play the animation. It seems like it's playing a bit fast, so I'll click stop. I'll select the first frame, then hold down the Shift key to select all the frames by clicking on the last frame. And I'll use the downward pointing arrow there to change the duration of each frame so that it has a delay of 0.1 seconds. Now when I click the play button, it's going to play a little bit more slowly. Alright, we can stop that. And we can also choose the number of times that we want the animation to play. We can select from the presets Once, 3 times, or Forever, or we can choose our own number of times. I'm going to leave this set to Forever. Alright, so we've done all of this work. I'm going to choose File and then Save As. Let's append this with an _01, saving it back to the animations folder as a layered Photoshop document. So now we need to save this as our animated GIF file. Well, I could certainly choose File and then Save a Copy, and that would let me access the GIF file format, and it would actually include the animation. But we need to optimize this first, because it's a very large file, and if we put this on the web, it's going to take a long time to download and then play. So I'm going to choose Cancel. And to access all these additional options, I'll use the File menu and choose Export, and then Save for Web. In the Save for Web dialogue, we're going to want to save this in the GIF format, but we can see that it is almost 400 K, and that's far too big, and that's because the file that we started with was so large. So there are a variety of different ways that we can decrease the size of this animation. The easiest way would be to change the image size. So instead of having 4,000 pixels, I'm going to lower the image size down to 800 pixels. So we're decreasing the percentage down to 20%, and that gets us a much smaller file. The other way that we can decrease the file size is by decreasing the number of colors in the color table. So from the Colors dropdown menu, let's go ahead and choose a minimum number of colors like four. But unfortunately, when we do that, we are seeing some jaggies around the edges of the flower. Now, one of the reasons that this image is compressing so well is because the background, the flower, and the bee are all made up of flat color. There's not a lot of difference in those colors at all. I'm going to go ahead and move it up to eight, though, because that'll just help get rid of some of the jaggies around the flower. Now, if I know that there's a maximum size that's allowed for this animation before I post it, we can use this dropdown menu and choose to optimize to a specific file size. But for now, I'm going to choose Cancel. You can also get a preview for the download time for the size using this menu here. And we can also preview this in a browser by clicking on Preview. Alright, I'm happy with the file size of 36 K, so I'll choose Save in order to save out this animation. We'll save it to the same folder, and then when we return to Bridge, we can see the animation, and if we tap play, we can actually watch the animation within Bridge. So next time you need to create an animation in Photoshop, be sure to use the timeline and the Save for Web options.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.