diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2016-07-01 10:20:24 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2016-07-01 10:20:24 +0200 |
commit | 2df24d283591f0a7037b658bb637577613e0439a (patch) | |
tree | f2d6c943450b070307b025437e19eda1f8f96a19 /pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils | |
parent | dc834260d57e5d94e11d4c617f005369ccde2ce7 (diff) | |
download | pdf-as-4-2df24d283591f0a7037b658bb637577613e0439a.tar.gz pdf-as-4-2df24d283591f0a7037b658bb637577613e0439a.tar.bz2 pdf-as-4-2df24d283591f0a7037b658bb637577613e0439a.zip |
added augmentating signature profiles
Diffstat (limited to 'pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils')
-rw-r--r-- | pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java | 11 |
1 files changed, 10 insertions, 1 deletions
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) { |