[FIX] Refactor implementation all image ops.

Closes #4.
Closes #5.