DImage implemented

Can be merged along with -lib