Picture Restoreage Algorithm in C language