aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/poifs/filesystem
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2019-11-01 17:18:13 +0000
committerAndreas Beeker <kiwiwings@apache.org>2019-11-01 17:18:13 +0000
commitf7c28ad08f34de47bdc1f6315ccd858570a363e5 (patch)
tree311676fd07e6784e7fc892cf8324765ce36979fc /src/java/org/apache/poi/poifs/filesystem
parent3f0a01ae7cf30a8c0da4c3af84c3e05da79a7d63 (diff)
downloadpoi-f7c28ad08f34de47bdc1f6315ccd858570a363e5.tar.gz
poi-f7c28ad08f34de47bdc1f6315ccd858570a363e5.zip
#60656 - EMF image support in slideshows
- extract option for embedded element in PPTX2PNG - minor GenericRecordJsonWriter fixes - fix EMF+ world transformations - fix initialization emf pictures, which were partly unbounded -> excessive memory consumption - change EMF+ brushes to continueable record git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1869272 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/poifs/filesystem')
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/FileMagic.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/FileMagic.java b/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
index 16312f5897..4e4ffa9d44 100644
--- a/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
+++ b/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
@@ -94,12 +94,21 @@ public enum FileMagic {
PNG(new byte[]{ (byte)0x89, 'P', 'N', 'G', 0x0D, 0x0A, 0x1A, 0x0A }),
/** TIFF Image */
TIFF("II*\u0000", "MM\u0000*" ),
+ /** WMF image with a placeable header */
+ WMF(new byte[]{ (byte)0xD7, (byte)0xCD, (byte)0xC6, (byte)0x9A }),
+ /** EMF image */
+ EMF(new byte[]{
+ 1, 0, 0, 0,
+ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
+ '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
+ ' ', 'E', 'M', 'F'
+ }),
// keep UNKNOWN always as last enum!
/** UNKNOWN magic */
UNKNOWN(new byte[0]);
// update this if a longer pattern is added
- final static int MAX_PATTERN_LENGTH = 12;
+ final static int MAX_PATTERN_LENGTH = 44;
final byte[][] magic;