aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-07-01 10:20:24 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-07-01 10:20:24 +0200
commit2df24d283591f0a7037b658bb637577613e0439a (patch)
treef2d6c943450b070307b025437e19eda1f8f96a19 /pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils
parentdc834260d57e5d94e11d4c617f005369ccde2ce7 (diff)
downloadpdf-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.java11
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) {