%%%%#### Program that mizes R, G and B components
%#1 r->g g->b b->r
%#2 r->b g->r r->g
%#3 r->r g->b b->g
%#4 r->g g->r b->b
%#5 r->b g->g b->r

 A=imread("Gnu-and-penguin-color.png");
 R=A(:,:,1);
 G=A(:,:,2);
 B=A(:,:,3);

imwrite(A(:,:,4), "minha_saidaKKKK.png");

 Rl=G;
 Gl=B;
 Bl=R;
 B(:,:,1)=Rl;
 B(:,:,2)=Gl;
 B(:,:,3)=Bl;
 imwrite(B, "minha_saida1.png");

size(R)
size(G)
size(B)

 Rl=B;
 Gl=R;
 Bl=G;
 B(:,:,1)=Rl;
 B(:,:,2)=Gl;
 B(:,:,3)=Bl;
 imwrite(B, "minha_saida2.png");


 Rl=R;
 Gl=B;
 Bl=G;
 B(:,:,1)=Rl;
 B(:,:,2)=Gl;
 B(:,:,3)=Bl;
 imwrite(B, "minha_saida3.png");


 Rl=G;
 Gl=R;
 Bl=B;
 B(:,:,1)=Rl;
 B(:,:,2)=Gl;
 B(:,:,3)=Bl;
 imwrite(B, "minha_saida4.png");


 Rl=B;
 Gl=G;
 Bl=R;
 B(:,:,1)=Rl;
 B(:,:,2)=Gl;
 B(:,:,3)=Bl;
 imwrite(B, "minha_saida5.png");



pause

