Fix vertical resizing for large pictures