moved image operations into a separated lib; erlang interop