diff --git a/src/main/java/w2phtml/base/BinaryGraphicsDocument.java b/src/main/java/w2phtml/base/BinaryGraphicsDocument.java
index f7386a4..d5e8dec 100644
--- a/src/main/java/w2phtml/base/BinaryGraphicsDocument.java
+++ b/src/main/java/w2phtml/base/BinaryGraphicsDocument.java
@@ -265,7 +265,7 @@ public class BinaryGraphicsDocument implements OutputFile {
float targetPPI = config.getImageResolution();
//int targetQuality = config.getImageQuality();
//float quality = targetQuality / 100;
- if (blob == null || style == null || isInvalidImageFormat()) {
+ if (blob == null || style == null || isInvalidImageFormat() || targetPPI < 1) {
return;
}
extractPPI();