Process image with gm