Refactored image converter