[image_view2] Refactor to use smaller functions

good bye to 700 lines method