diff --git a/src/main/java/w2phtml/base/BinaryGraphicsDocument.java b/src/main/java/w2phtml/base/BinaryGraphicsDocument.java index ce468b0..00834a5 100644 --- a/src/main/java/w2phtml/base/BinaryGraphicsDocument.java +++ b/src/main/java/w2phtml/base/BinaryGraphicsDocument.java @@ -229,6 +229,9 @@ public class BinaryGraphicsDocument implements OutputFile { } extractPPI(); int[] offsets = getOffsets(style); + if (offsets[0] == 0 && offsets[1] == 0 && offsets[2] == 0 && offsets[3] == 0) { + return; + } ByteArrayInputStream bis = new ByteArrayInputStream(blob); try { @@ -251,6 +254,7 @@ public class BinaryGraphicsDocument implements OutputFile { // TODO Auto-generated catch block e.printStackTrace(); } catch (RasterFormatException e ) { + System.out.println(e.getLocalizedMessage()); e.printStackTrace(); }