$ 0 0 It looks like reducing the number of colors only fails when there is a memory issue. Maybe you are processing to many images at the same time?