#include <stdio.h>
#include <stdlib.h>
#include "ppm.c"

int main( void )   /* usage:  foo.exe < in.ppm > out.ppm */
{
	image in, out;
	pixel p;
	int x,y;

	if( get_ppm_from_file( &in, stdin ) && copy_ppm( in, &out ) ) {

		for( x=0; x<out.width; x++ ) 
			for( y=0; y<out.height; y++ ) {
				p = get_pixel( out, x, y );			
				p.rgb[0] = 0;
				p.rgb[1] = 0;
				put_pixel( out, x, y, p );
			}

		put_ppm_to_file( out, stdout );
		dealloc_ppm( in );
		dealloc_ppm( out );
	}
	return 0;
}
