From 2df24d283591f0a7037b658bb637577613e0439a Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 1 Jul 2016 10:20:24 +0200 Subject: added augmentating signature profiles --- .../main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java') diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java index 39ebd3e0..96efa315 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java @@ -179,7 +179,16 @@ public class ImageUtils { } is = new FileInputStream(img_file); - } catch (PdfAsException | IOException e) { + } catch (PdfAsException e) { + try { + is = new ByteArrayInputStream(Base64.decodeBase64(imageValue)); + } catch (Throwable e1) { + // Ignore value is not base 64! + logger.debug("Value is not base64: ", e1); + // rethrow e + throw e; + } + } catch (IOException e) { try { is = new ByteArrayInputStream(Base64.decodeBase64(imageValue)); } catch (Throwable e1) { -- cgit v1.2.3