Reversing images to gray with java swing gui in eclipse