consolidate logic to resize image to maximum height
consolidate logic to resize image to maximum height

mojavelinux/asciidoctor-pdf,mojavelinux/asciidoctor-pdf,asciidoctor/asciidoctor-pdf,asciidoctor/asciidoctor-pdf,Hextremist/asciidoctor-pdf,Hextremist/asciidoctor-pdf,dsisnero/asciidoctor-pdf,dsisnero/asciidoctor-pdf