An artificial neural network for image compression