Skip to content

Instantly share code, notes, and snippets.

Created May 14, 2014 01:56
private boolean isEmptyImage(PDXObjectImage image) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
image.write2OutputStream(baos);
baos.flush();
int size = baos.toByteArray().length;
baos.close();
if (size < 1) {
String msg = "ignore empty image";
System.out.println(msg);
log.info(msg);
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment