draw horizontal and square images correctly