iconEuler Home

Grayscale

>A=loadrgb("mona.jpg");
>insrgb(A);

Grayscale

>function grayscale (A) ...
 {r,g,b}=getrgb(A);
 c=0.2126*r+0.7152*g+0.0722*b;
 return rgb(c,c,c);
 endfunction
>insrgb(grayscale(A));

Grayscale

>insrgb(A|grayscale(A));

Grayscale

Euler Home