xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bowditch <bowditch_ch...@hotmail.com>
Subject Re: Problem in rendering PNG images with ImageLoaderRawPNG in XMLGraphics 2.0.1 and FOP2.0
Date Thu, 05 Nov 2015 10:47:46 GMT
Hi,

Can you share the PNG Image you are using? If so please file a bug in 
JIRA and attach the PNG and XSL-FO you are using.

Thanks,

Chris

On 05/11/2015 09:02, Mandar Nimbkar wrote:
> Hi,
>
> I am migrating from FOP 1.0 to FOP 2.0
>
> I have made the required Java code changes as per the changed API.
>
> There are PNG images used in the report generated using PDF renderer..
>
> Initially with FOP 1.0, I tried ImageLoaderPNG. However, the resolution of the image
gets impacted. So I shifted to ImageLoaderRawPNG which rendered it properly.
> Attaching the files.
> 1) graph.png - The original PNG image
> 2) FOP-PNGImageLoader-differences.docx - The rendered images with ImageLoaderPNG and
ImageLoaderRawPNG
>
> So this was working fine with FOP 1.0
> However, FOP 2.0 is not able to render the image with ImageLoaderRawPNG and throws following
exception..
> --------------------------------
>
> 16:38:20.992 53425 [ReportFormatService-0] ERROR AreaTreeModel  - Error while rendering
page 1
> java.lang.RuntimeException: Error processing transparency channel:
>         at org.apache.fop.render.pdf.ImageRawPNGAdapter.setup(ImageRawPNGAdapter.java:148)
>         at org.apache.fop.pdf.PDFDocument.addImage(PDFDocument.java:872)
>         at org.apache.fop.render.pdf.AbstractPDFImageHandler.handleImage(AbstractPDFImageHandler.java:46)
>         at org.apache.fop.render.pdf.PDFImageHandlerRawPNG.handleImage(PDFImageHandlerRawPNG.java:35)
>         at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
>         at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
>         at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
>         at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
>         at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
>         at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
>         at org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
>         at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
>         at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
>         at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:863)
>         at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
>         at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:927)
>         at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:690)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:572)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:757)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:600)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractPathOrientedRenderer.renderReferenceArea(AbstractPathOrientedRenderer.java:757)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:600)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:613)
>         at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:999)
>         at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
>         at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:457)
>         at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:785)
>         at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:434)
>         at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:358)
>         at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:305)
>         at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:738)
>         at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:278)
>         at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:243)
>         at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:586)
>         at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
>         at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:315)
>         at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:216)
>         at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.makeNewPage(AbstractPageSequenceLayoutManager.java:286)
>         at org.apache.fop.layoutmgr.PageSequenceLayoutManager.makeNewPage(PageSequenceLayoutManager.java:176)
>         at org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:601)
>         at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:170)
>         at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:158)
>         at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:384)
>         at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
>         at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:138)
>         at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
>         at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
>         at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
>         at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
>         at com.guidant.framework.utility.report.ContentHandlerSplitter.endElement(ContentHandlerSplitter.java:235)
>         at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
>         at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1401)
>         at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
>         at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at com.guidant.framework.utility.report.extension.WithinContainerElement.process(WithinContainerElement.java:155)
>         at com.guidant.framework.utility.report.extension.XalanTransformExtensionElement.withinContainer(XalanTransformExtensionElement.java:241)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at org.apache.xalan.extensions.ExtensionHandlerJavaClass.processElement(ExtensionHandlerJavaClass.java:517)
>         at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:234)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at com.guidant.framework.utility.report.extension.ForEachReportElement.process(ForEachReportElement.java:119)
>         at com.guidant.framework.utility.report.extension.XalanTransformExtensionElement.forEachReport(XalanTransformExtensionElement.java:71)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at org.apache.xalan.extensions.ExtensionHandlerJavaClass.processElement(ExtensionHandlerJavaClass.java:517)
>         at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:234)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at com.guidant.framework.utility.report.extension.WithinNewStackFrameElement.process(WithinNewStackFrameElement.java:102)
>         at com.guidant.framework.utility.report.extension.XalanTransformExtensionElement.withinNewStackFrame(XalanTransformExtensionElement.java:128)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at org.apache.xalan.extensions.ExtensionHandlerJavaClass.processElement(ExtensionHandlerJavaClass.java:517)
>         at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:234)
>         at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
>         at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
>         at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
>         at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
>         at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
>         at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
>         at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253)
>         at com.guidant.framework.utility.report.AbstractReportFormatter.formatReport(AbstractReportFormatter.java:221)
>         at com.guidant.framework.viewcontroller.ReportFormatService.format(ReportFormatService.java:286)
>         at com.guidant.framework.viewcontroller.ReportFormatService.access$2(ReportFormatService.java:246)
>         at com.guidant.framework.viewcontroller.ReportFormatService$FormatOperation.logic(ReportFormatService.java:412)
>         at com.guidant.framework.core.activeComponent.OperationRequest.execute(OperationRequest.java:287)
>         at com.guidant.framework.core.activeComponent.ExecutionThread.run(ExecutionThread.java:192)
> Caused by: java.io.EOFException: Unexpected end of ZLIB input stream
>         at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:240)
>         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
>         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)
>         at java.io.FilterInputStream.read(FilterInputStream.java:83)
>         at org.apache.fop.render.pdf.ImageRawPNGAdapter.setup(ImageRawPNGAdapter.java:137)
>         ... 119 more
>
> Pls help
>
> Regards,
> Mandar
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Information contained and transmitted by this e-mail is confidential and proprietary
to IGATE and its affiliates and is intended for use only by the recipient. If you are not
the intended recipient, you are hereby notified that any dissemination, distribution, copying
or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately
and notify the originator or mailadmin@igate.com <mailto:mailadmin@igate.com>. IGATE
does not enter into any agreement with any party by e-mail. Any views expressed by an individual
do not necessarily reflect the view of IGATE. IGATE is not responsible for the consequences
of any actions taken on the basis of information provided, through this email. The contents
of an attachment to this e-mail may contain software viruses, which could damage your own
computer system. While IGATE has taken every reasonable precaution to minimise this risk,
we cannot accept liability for any damage which you sustain as a result of software viruses.
You should carry out your own virus checks before opening an attachment. To know more about
IGATE please visit www.igate.com <http://www.igate.com>.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message