Image Processing code in a c shape windows application