properly handle very wide images