Added refactoring and added image dimension and flag attribute for macro