added some image processing functions
Changed all to unsigned char, added some more functions
added some functions for image processing