Image compression using a perceptron