https://bz.apache.org/bugzilla/show_bug.cgi?id=61112

            Bug ID: 61112
           Summary: Ppt background is black when using Apache POI to
                    convert slide to image
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
          Assignee: dev@poi.apache.org
          Reporter: nanoticket2...@hotmail.com
  Target Milestone: ---

Created attachment 35001
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35001&action=edit
ppt slide and generated image

I am using the below code to convert ppt slides to image.

BufferedImage imBuff = new BufferedImage(pgsize.width, (pgsize.height) *
slides.size(), BufferedImage.TYPE_INT_RGB);
Graphics g = imBuff.getGraphics();
Graphics2D graphics = img.createGraphics();
graphics.setRenderingHint(Drawable.FONT_MAP, fontMap);
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
graphics.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
RenderingHints.VALUE_FRACTIONALMETRICS_ON);
graphics.setPaint(TRANSPARENT);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height));
slides.get(i).draw(graphics);
g.drawImage(img, 0, i * (pgsize.height), null);

For some .ppt files, the background appears as black. Does anyone know what is
the reason and how to fix this? I suspect that the office software used to
create the .ppt files might be a factor, but I am not able to confirm.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to