Manipulating Images


During the development of your project, you will have to manipulate images in order to get them to fit your needs. The basics of image manipulation are similar to the text editing you may have done in your word processor. Commands such as Cut, Copy, and Paste are common. We will also look at Skew, Rotate, Resize, Crop, and Flip.

Cut: If you cut an image, you remove it from the scene. But do not worry—you can paste it back in or undo your action.

Copy: Copy does not alter your image, but it creates a copy in the memory of your computer that you can paste in somewhere else, as shown in Figure 3.25.

click to expand
Figure 3.25 Cutting and copying sections of an image. Note: Copying does not affect the image.

Paste: As mentioned above, after cutting or copying an image, you can paste it in somewhere else, as shown in Figure 3.26.

click to expand
Figure 3.26 Pasting a section of an image.

Skew: Some image manipulation programs allow you to skew (slant, deform, or distort) an image, as shown in Figure 3.27.

click to expand
Figure 3.27 Skewing an image.

Rotate: Rotating is pretty self explanatory. You can free rotate an image or rotate it precisely a certain amount, as shown in Figure 3.28.

click to expand
Figure 3.28 Rotating an image.

Resize: Resizing an image is useful, but be careful. Any severe manipulation of an image degrades it, and resizing does a lot of damage. Caution: If you reduce an image and then enlarge it again, you will seriously degrade it. This is because, in effect, you are enlarging a small image. The degradation takes place going down as well as going up in scale. This is illustrated in Figures 3.29, 3.30, and 3.31.

click to expand
Figure 3.29 A smaller image blown up; pixel rip.

click to expand
Figure 3.30 An image reduced.

click to expand
Figure 3.31 The same image enlarged to its original size. Notice what this has done.

Crop: Cropping actually cuts an image smaller to a defined area, as shown in Figures 3.32 and 3.33.

click to expand
Figure 3.32 Cropping an image. The crop outline.

click to expand
Figure 3.33 The image cropped. Everything outside the crop outline is now gone.

Flip (horizontal and vertical): Finally, you can flip images horizontally and vertically (see Figures 3.34, 3.35, and 3.36).

click to expand
Figure 3.34 The image.

click to expand
Figure 3.35 The image flipped horizontally.

click to expand
Figure 3.36 The image flipped vertically.




Awesome 3d Game Development(c) No Programming Required
Awesome 3d Game Development: No Programming Required (Charles River Media Game Development)
ISBN: 1584503254
EAN: 2147483647
Year: 2006
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net