program for reduce images