adjust image zoom algorithm, zoom to width first