Refactore Image

Please see diff.

**Attention: It is not tested.**