New read function added and all functions work with gray image chaining and removebackground