Considerably improved Image class.