aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2015-08-01 20:09:37 +0000
committerAndreas Beeker <kiwiwings@apache.org>2015-08-01 20:09:37 +0000
commitbb3970b2bf8bebe8ce01969de323dfa8b8ffe80b (patch)
tree6c40401c34f1475ab6ad78321de6419b428a42f1 /src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
parentbc1d4f59b0a23cfadb58600d5582509f64aa9c45 (diff)
downloadpoi-bb3970b2bf8bebe8ce01969de323dfa8b8ffe80b.tar.gz
poi-bb3970b2bf8bebe8ce01969de323dfa8b8ffe80b.zip
#58193 - Use input stream rather than byte array for checksum etc.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1693754 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java')
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
index 0ec83497a4..73ec45b9a8 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
@@ -22,7 +22,6 @@ package org.apache.poi.xslf.usermodel;
import java.awt.Insets;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
import java.net.URI;
import javax.imageio.ImageIO;
@@ -91,10 +90,8 @@ public class XSLFPictureShape extends XSLFSimpleShape implements PictureShape {
* for other types sets the default size of 200x200 pixels.
*/
public void resize() {
- XSLFPictureData pict = getPictureData();
-
try {
- BufferedImage img = ImageIO.read(new ByteArrayInputStream(pict.getData()));
+ BufferedImage img = ImageIO.read(getPictureData().getInputStream());
setAnchor(new Rectangle2D.Double(0, 0, img.getWidth(), img.getHeight()));
}
catch (Exception e) {