Moved image dimension function from operation to utils class