use ImageConverter and remove useless code