In my java project I need a method to convert an 8-bit (0,225) Grayscale image to a 3-bit one (0,7). Any ideas?
I used this method but it gives me
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
image.getRaster().setSample(x, y, image.getRaster().getSample(x,y, 0)/32)