Simple image processing routines - learning project