Add grayscale support to shrink script