ImageResizer refactoring