//Image operations to perform clockwise and anti-clockwise operations
//Scilab 5.4.1
//Windows 10 
//Requires SIVP, IPD toolboxes

clear;
clc;

A = imread('Cameramanimg.jpg');

//Rotate the Image anticlockwise by an angle of 90 degrees
[M,N]=size(A);
for i=1:N
    for j=1:M
        B(j,i)=A(i,j);
    end
end
NM=B(N:-1:1,:);
imwrite(NM,'anticlockwise90.jpeg')

//Rotate the Image by an angle of 180 degrees
B= A(size(A,1):-1:1,size(A,1):-1:1,:);
imwrite(B,'clockwise180.jpeg')
