An artificial neural network is proposed which is able to compress an image by computing a nonlinear nonorthogonal transform and its inverse. The network is trained with small blocks extracted from an image; after the learning phase, it proves to give satisfactory performances both for the learned and for different unlearned images.