Lessons 8–9 · 2 lessons · N. I. Taylaqov (general editor), A. B. Akhmedov, M. D. Pardayeva, A. A. Abdug‘aniyev, U. M. Mirsanov. Informatics and Information Technologies, Grade 11, 1st edition. “Extremum-press”, Tashkent, 2018
8
Cropping images and applying transformations
Textbook: pp. 31–35
GoalCrops an image, corrects perspective and applies transformations (scale, rotate, skew, distort, flip).
New words
cropping: cutting off the unwanted edges of a picture with the Crop tool · kadrlashperspective: how an object looks from the chosen shooting point, for example converging building edges · perspektivaFree Transform (Ctrl+T): a frame around a selection or layer for scaling, rotating and distorting · Free TransformFlip: a mirror image of the picture horizontally or vertically · o‘girish (Flip)
Explanation
A photograph often catches unwanted things or the subject slides toward the edge of the frame; we fix this with the Crop tool, key C: dragging from one corner of the picture to the opposite one frames the chosen part, the frame's markers change its size, dragging outside a corner rotates it, and Enter confirms. The options bar lets you choose the aspect ratio (1:1, 4:5, 16:9) and whether to delete or keep the cropped pixels. If the shooting point is wrong, the vertical edges of a building lean toward each other at the top; we correct this with Perspective Crop or Edit → Transform → Perspective: we move the top corners until the vertical lines of the grid are parallel to the building wall. The transformations are in Edit → Transform: Scale, Rotate, Skew, Distort, Perspective, Warp, rotation by 180° and 90°, and Flip Horizontal/Vertical; free transform is Ctrl+T. In newer versions the proportions are kept automatically while resizing and Shift switches this off. Before applying an operation, the part of the picture must be selected. In an enlarged raster no new detail appears: the program “invents” extra pixels by interpolation, so quality drops.
Worked examples
A square frame is needed from a 6000×4000 pixel landscape: choose ratio 1:1 in the Crop tool; the largest square is 4000×4000 = 16 000 000 pixels. We move the frame to the right place and press Enter.
A picture is 4000×3000 pixels; scaled to 25% with Ctrl+T it becomes 1000×750 pixels (each side 4 times smaller, 16 times fewer pixels: 750 000). The opposite, enlarging to 400%, does not add quality, it only blurs.
Class activity
“Straightening workshop”: a pair takes a skewed picture of a building or a table (or a ready image), corrects the perspective and rotation, and shows a “before/after”.
Practice
1
Name at least five operations in the Edit → Transform menu.
Scale, Rotate, Skew, Distort, Perspective, Warp, Flip Horizontal, Flip Vertical (rotations by 90° and 180°).
2
If the largest possible square is cut from a 6000×4000 pixel photo, how many pixels does it have?
16000000
3
A photo taken with the phone held sideways appears lying down. Which operation makes it upright?
Rotate 90° (clockwise or counter-clockwise, depending on which way it lies).
4
Why does enlarging a raster picture to 400% not improve its quality?
No new detail appears; the program adds averaged-colour pixels by interpolation and the picture gets blurry.