Dana Vrajitoru
I310/D513 Multimedia Arts and Technology

Lab 5

Date: Wednesday, February 10, 2010.

Ex. 1 Open the Gimp and create a new image of a size of 200x200. Select a circular region inside this image, as big as you want, in the center of the image.

Set the background and foreground colors to two shades of your choosing, one of them dark and the other light. Click on the gradient button and set the gradient type to be a spiral (cw). Fill the circular selection with this gradient starting from the center and going out in any direction.

From the Layer menu, go to Transparency, then Add Alpha Channel. From the Select menu choose Invert, and then cut the white region out by Ctrl-x. You can unselect the region at this point. Here is an example of what you might have so far.

Duplicate this layer 11 times. Rename all the layers (including the background) as "frame 1", 2, up to 12. Add to the name of each frame the text "(50ms)" in parenthesis without the quotes. Here is an example of what the layers dialog might look like.

Click on the eye next to the layer name in the layers dialog for all the layers but the first two to hide them. Select the layer labeled frame 2 (one up from the very first one that was initially the background). Rotate this layer by -30 degrees - from the Layer menu choose Transform, then Arbitrary Rotation. Before moving to the next layer, from the Layers dialog move the Opacity of this layer down to about 30%. Click on the cross-shaped tool in the Toobox and move the layer such that the center of the spiral in the top layer is aligned with the one of the layer underneath. Once this is done, move the opacity back to 100%.

Select the third layer and make it visible by clicking on the eye. Rotate it by -60 degrees and align it like you did for the first one. Repeat the operation for all the other layers, incrementing the rotation angle by -30 every time. Note that a rotation of -180 is identical to a rotation by +180, so once you get to that angle you can use decrementing positive values instead of negative ones. The last layer should be rotated by 30 degrees. Save your image in xcf format from time to time.

From the image widows, the Filters menu, follow on Animation, then Playback. Play the resulting animation.

At this point crop the image so that it contains the circles and some transparent padding around them. Save the image as an xcf.

From the Filters menu select Animation, then Optimize (for GIF). This will create a new window that looks like the previous one. If you inspect the layers of this new window, you'll notice that many of them are smaller than the image size.

From the image window, the Image menu, Mode, select Indexed. Reduce the number of colors to 100 and selection an option of None for the dithering. Save this image as a gif. A dialog will open warning you that the image should be exported because of the multiple layers. Select the option "Save as Animation" in this dialog then click Export. In the next dialog make sure the option "Loop forever" is checked.

If you are on Windows, find the image in Windows Explorer and double click on it to display it with the Windows Picture and Fax Viewer. This should display the same animation that you saw in the playback in the Gimp. On MacOs, right-click on the image, then open it with Firefox or another broswer. You should see the spiral looping in both cases. Here is an example of the final result.

Ex. 2 Going back to the Gimp, create a new image of size 300x100. In this exercise we'll be creating a banner. Think of a text that you can divide in 2 parts to use on the banner (like, Multimedia / Arts and Technology)

From the toolbox select the Text Tool (A). Click somewhere close to the top left of the window. This will open a dialog in which you can enter some text. Enter the first part of the content of your banner. You can close the dialog. Without unselecting the text, increase the size (to whatever still fits in the window but is visible enough), change the font, modify the color of the text, whatever it takes to make it look good. Make your text bold in a font that you like.

Position the text using the cross tool so that it fits in the center of the image. Once you are satisfied with the result, from the image Window, the Image menu, select Merge Visible Layers (flatten image should do the same thing). You should now have a single layer containing the text.

Name this layer Frame 1 (500ms). Duplicate this layer 4 times (you should have 5 copies total). Modify their names as Frame 2, 3, etc., and delete the copy#1 and so on. Modify the timing the following way: leave the first frame to 500, make all the intermediate ones (2 to 4) as 70ms, and make the last one 150ms. At this point save your image as an xcf.

Apply the Gaussian blur filter to the frames 2 to 5, with a radius starting from 5 and increasing by 5 every time. If you install the Gimp Animation Package with the Gimp, this operation can be done automatically.

Once the operation terminates, run the animation playback to see the effect. This should look like your text is being gradually blurred.

Add a new non-transparent layer, in the background color. Name it Frame 6 and set its timing to 300ms. Add another layer of text containing the second part of your banner text. Hide the non-transparent layer. Using the cross button, position the new text so that it fits in the center and is aligned with the previous one. Make its background visible again (frame 6). Make sure the text layer is active, then from the Layer menu, choose Merge down. This should merge it with frame 6.

Playback the animation again to see the effect. Save the image as an xcf, then set its mode to indexed, and save it as a gif. Make sure you select the Animation option for the export again.

Apply the filter that optimizes the animation for GIF to this image too. Go through the layers to see the effect. Then play back the animation to see that the image looks the same. Here is an example of resulting image.

Note. You will have to send me the two gif images for the homework.