Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F9F8D7D2 for ; Thu, 22 Nov 2012 07:10:03 +0000 (UTC) Received: (qmail 31228 invoked by uid 500); 22 Nov 2012 07:10:03 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 30828 invoked by uid 500); 22 Nov 2012 07:09:57 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 30707 invoked by uid 99); 22 Nov 2012 07:09:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 07:09:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Nov 2012 07:09:52 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id E55E44C42; Thu, 22 Nov 2012 07:09:31 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 54188] New: NullPointerException ppt to png Date: Thu, 22 Nov 2012 07:09:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: HSLF X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vitaliy.chekhunov@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter classification Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=54188 Bug ID: 54188 Summary: NullPointerException ppt to png Product: POI Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: HSLF Assignee: dev@poi.apache.org Reporter: vitaliy.chekhunov@gmail.com Classification: Unclassified exception: java.lang.NullPointerException at org.apache.poi.hslf.model.Freeform.getOutline(Freeform.java:248) at org.apache.poi.hslf.model.ShapePainter.paint(ShapePainter.java:37) at org.apache.poi.hslf.model.TextShape.draw(TextShape.java:561) at org.apache.poi.hslf.model.Slide.draw(Slide.java:431) code: SlideShow ppt = new SlideShow(fromIS); Dimension pgsize = ppt.getPageSize(); Slide[] slide = ppt.getSlides(); for (int i = 0; i < slide.length; i++) { BufferedImage img = new BufferedImage(pgsize.width, pgsize.height, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = img.createGraphics(); graphics.setPaint(Color.white); graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height)); slide[i].draw(graphics); //save the output FileOutputStream out = new FileOutputStream(outputFile.getParent() + "/slide-" + (i+1) + ".png"); javax.imageio.ImageIO.write(img, "png", out); out.close(); } -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org