if ((imagesToProcess != null && imagesToProcess.size() > 0))
{
for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
{
JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();
JRPrintImage image = getImage(jasperPrintList, imageIndex);
JRRenderable renderer = image.getRenderer();
if (renderer.getType() == JRRenderable.TYPE_SVG)
{
renderer =
new JRWrappingSvgRenderer(
renderer,
new Dimension(image.getWidth(), image.getHeight()),
ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
);
}
String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());
if (mimeType == null)
{
mimeType = JRRenderable.MIME_TYPE_JPEG;
}
String extension = mimeType.substring(mimeType.lastIndexOf('/') + 1);
String imageName = IMAGE_NAME_PREFIX + imageIndex.toString() + "." + extension;
pptxZip.addEntry(//FIXMEPPTX optimize with a different implementation of entry
new FileBufferedZipEntry(
"ppt/media/" + imageName,
renderer.getImageData()