Afanasyev Kirill P3206
Declarative (!!!) image transformation library with console usage as rotation image by some angle.
Implemented commands:
- Image rotation by 0, 90, 180, 270 clockwise or counterclockwise
- Image blurring by 3x3 square
Each command may be mixed with others, applied as many times as needed, etc. All errors triggers interpreter to abort executing commands with information about last executed command. Also implemented some primitive console output error handling.
Some examples:
Example 1:
zerumi@MacBook-Air-Kirill solution % ./image-transformer input.bmp d_output.bmp 180
Image successfully rotated by 180 degrees clockwise
zerumi@MacBook-Air-Kirill solution % ./image-transformer input.bmp d_output.bmp -180
Image successfully rotated by 180 degrees counterclockwise
(program passes all tests)
Example 2:
zerumi@MacBook-Air-Kirill solution % ./image-transformer input.bmp d_output.bmp 12
Something went wrong during command execution!
Command: Rotating image
-------------------------------------
Status code of broken command: 44
Function rejected provided arguments!
Usage: IMAGE_ROTATE <angle>. Angle should be dividable by 90!
Example 3 (with chmod u-w d_output.bmp
):
zerumi@MacBook-Air-Kirill solution % ./image-transformer input.bmp d_output.bmp 90
Something went wrong during command execution!
Command: Open file
-------------------------------------
Status code of broken command: 45
Permission denied