All pastes #465799 Raw Edit

Stuff

public text v1 · immutable
#465799 ·published 2007-04-30 16:27 UTC
rendered paste body
 /*	if(x-1>=0&&y-1>=0&&x+1<w&&y+1<h)
					 	{
					 	imagearray[x+1][y] += error * 7/16;
					 	imagearray[x+1][y+1] += error * 1/16;
					 	imagearray[x][y+1] += error * 5/16;
					 	imagearray[x-1][y+1] += error * 3/16;
					 	}*/
					 	
					 	for (int i=-f_x;  i<=f_x;  i++)
					        for (int j=-f_y;  j<=f_y;  j++)
					        	if(x+i>=0&&y+j>=0&&x+i<w&&y+j<h)
					        		imagearray[x+i][y+j] += error*filter[i+f_x][j+f_y];