Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -106,12 +106,12 @@ Image!RGB gray2rgbImage(in Image!Gray im) {
version (grayscale_image_main) {
void main() {
auto im1 = new Image!Gray();
auto im1 = new Image!Gray;
im1.loadPGM("lena.pgm");
gray2rgbImage(im1).savePPM6("lena_rgb.ppm");
auto img2 = new Image!RGB();
auto img2 = new Image!RGB;
img2.loadPPM6("quantum_frog.ppm");
img2.rgb2grayImage().savePGM("quantum_frog_grey.pgm");
img2.rgb2grayImage.savePGM("quantum_frog_grey.pgm");
}
}

View file

@ -0,0 +1,9 @@
>A=loadrgb("mona.jpg");
>insrgb(A);
>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));
>insrgb(A|grayscale(A));