The geometric transformation commands reposition pixels in space without altering their colour values. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Adarsh275/Image-Transformation/llms.txt
Use this file to discover all available pages before exploring further.
flip command mirrors an image horizontally in a single NumPy operation, while rotate applies a full rotation matrix to move every pixel to its new position in an automatically expanded canvas. Both commands follow the standard python main.py <command> <src> <dest> syntax; rotate additionally prompts you for an angle before processing begins.
flip
Theflip command mirrors the image horizontally — left becomes right and right becomes left — by passing the pixel array through NumPy’s np.fliplr(). The operation is lossless and produces an output with exactly the same dimensions as the source.
- Interactive prompt: none
- Output suffix:
_flipped
mountains_flipped.jpg
rotate
Therotate command rotates the image by an arbitrary integer angle (in degrees) using a standard 2-D rotation matrix. For each pixel at coordinates (x, y) relative to the image centre, the new position is computed as:
The rotation prompt accepts only integer values. Passing a decimal angle (e.g.,
45.5) will raise a ValueError because the implementation calls int() on your input directly.- Interactive prompt:
Enter angle in degrees:— integer (e.g.,45) - Output suffix:
_rotated_<angle>
building_rotated_45.jpg