Image coding using artificial neural networks