X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Ftterminal%2FSixel.java;h=63e3c0fadcfa670d308c0f327f89f8e21313b810;hb=0d86ab8480cabbe32fc87588304ddc795a4df14f;hp=1921f44e5c83716ba0c75e2634e30617e3582c20;hpb=74bbd9bc0e25466aa5984efeef033f887caf58fb;p=fanfix.git diff --git a/src/jexer/tterminal/Sixel.java b/src/jexer/tterminal/Sixel.java index 1921f44..63e3c0f 100644 --- a/src/jexer/tterminal/Sixel.java +++ b/src/jexer/tterminal/Sixel.java @@ -172,6 +172,11 @@ public class Sixel { BufferedImage newImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_ARGB); + if (DEBUG) { + System.err.println("resizeImage(); old " + image.getWidth() + "x" + + image.getHeight() + " new " + newWidth + "x" + newHeight); + } + Graphics2D gr = newImage.createGraphics(); gr.drawImage(image, 0, 0, image.getWidth(), image.getHeight(), null); gr.dispose(); @@ -407,14 +412,15 @@ public class Sixel { toGround(); } - if (height + 6 < image.getHeight()) { + height += 6; + x = 0; + + if (height + 6 > image.getHeight()) { // Resize the image, give us another HEIGHT_INCREASE // pixels of vertical length. resizeImage(image.getWidth(), image.getHeight() + HEIGHT_INCREASE); } - height += 6; - x = 0; return; }