Pull request #113: Ignore too small images
Merge in RED/redaction-service from IgnoreTooSmall to master * commit '39ca191b9cb5dec5fbb01e8319cbbe361c7cd85e': Ignore too small images
This commit is contained in:
commit
ec4db538a7
@ -216,7 +216,9 @@ public class PDFLinesTextStripper extends PDFTextStripper {
|
||||
Rectangle2D rect = new Rectangle2D.Float((float) imageBounds.getX(), (float) imageBounds.getY(), (float) imageBounds
|
||||
.getWidth(), (float) imageBounds.getHeight());
|
||||
|
||||
this.imageBounds.add(rect);
|
||||
if(rect.getHeight() > 2 && rect.getWidth() > 2) {
|
||||
this.imageBounds.add(rect);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Problem during image extraction: {}", e.getMessage());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user