Bug 461740 - fop can't read PNG files
Summary: fop can't read PNG files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: fop
Version: 11
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rodney Russ
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-10 10:38 UTC by Murray Cumming
Modified: 2010-06-28 10:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 10:44:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
docbook_fop_test.tar.gz (206.69 KB, application/x-gzip)
2008-09-10 10:38 UTC, Murray Cumming
no flags Details
docbook_fop_test.tar.gz (Reupload) (526.15 KB, application/x-gzip)
2008-09-11 11:38 UTC, Murray Cumming
no flags Details

Description Murray Cumming 2008-09-10 10:38:46 UTC
Created attachment 316297 [details]
docbook_fop_test.tar.gz

Description of problem:

FOP can't handle files that use .png images, though it can handle .jpeg images. Maybe this is a problem with the Java class library. FOP should handle the exception more pleasantly if it is.

Steps to Reproduce:

Extract the attached (very simple) test archive, and do this:

[murrayc@localhost docbook_fop_test]$ ls
flumotion.xml  test.png
[murrayc@localhost docbook_fop_test]$
[murrayc@localhost docbook_fop_test]$ xsltproc -o flumotion.fo -xinclude --catalogs http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl flumotion.xml
Variable $SGML_CATALOG_FILES not set
Making portrait pages on USletter paper (8.5inx11in)

[murrayc@localhost docbook_fop_test]$ 
[murrayc@localhost docbook_fop_test]$ fop -fo flumotion.fo -pdf flumotion.pdf
Sep 10, 2008 12:33:49 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'Symbol,normal,700' not found. Substituting with 'Symbol,normal,400'.
Sep 10, 2008 12:33:49 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'ZapfDingbats,normal,700' not found. Substituting with 'ZapfDingbats,normal,400'.
Sep 10, 2008 12:33:50 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en
Sep 10, 2008 12:33:52 PM org.apache.fop.area.RenderPagesModel addPage
SEVERE: Error while rendering page 3
java.lang.UnsupportedOperationException: Unsupported DataBuffer type: java.awt.image.DataBufferUShort
	at org.apache.fop.pdf.AlphaRasterImage.outputContents(AlphaRasterImage.java:169)
	at org.apache.fop.pdf.PDFImageXObject.outputRawStreamData(PDFImageXObject.java:145)
	at org.apache.fop.pdf.AbstractPDFStream.encodeAndWriteStream(AbstractPDFStream.java:155)
	at org.apache.fop.pdf.AbstractPDFStream.output(AbstractPDFStream.java:199)
	at org.apache.fop.pdf.PDFImageXObject.output(PDFImageXObject.java:65)
	at org.apache.fop.pdf.PDFDocument.output(PDFDocument.java:937)
	at org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1767)
	at org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1679)
	at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:734)
	at org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPathOrientedRenderer.java:557)
	at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:617)
	at org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java:1345)
	at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:592)
	at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1336)
	at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:529)
	at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
	at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
	at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
	at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
	at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
	at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
	at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
	at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
	at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
	at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:564)
	at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1329)
	at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:519)
	at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:424)
	at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:403)
	at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:337)
	at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:282)
	at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:255)
	at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:229)
	at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:801)
	at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:113)
	at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312)
	at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:167)
	at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:108)
	at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
	at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:196)
Sep 10, 2008 12:33:52 PM org.apache.fop.cli.InputHandler error
SEVERE: javax.xml.transform.TransformerException: Unsupported DataBuffer type: java.awt.image.DataBufferUShort
Sep 10, 2008 12:33:52 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: java.lang.UnsupportedOperationException: Unsupported DataBuffer type: java.awt.image.DataBufferUShort
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:196)

Comment 1 Murray Cumming 2008-09-11 11:38:49 UTC
Created attachment 316423 [details]
docbook_fop_test.tar.gz (Reupload)

Trying to upload this again, because the original attachment can't be opened.

Comment 2 Murray Cumming 2008-09-11 11:44:21 UTC
Something seem to be wrong with the attachment system, so I uploaded it here instead:
http://www.murrayc.com/temp/docbook_fop_test.tar.gz

This seems to be a problem only with _some_ .png files. For instance, this file was created by "mogrify --resize 450x450", but the original file worked with fop. Other applications (such as eog) have no problem with the .png file.

Comment 3 Lillian Angel 2008-09-12 17:30:34 UTC
This also fails with Sun's JDK. This is not a problem with the Java class library. I am looking into why fop fails this way.

Comment 4 Lillian Angel 2008-09-12 18:34:18 UTC
It seems like fop throws this error if the dataType is not TYPE_BYTE or TYPE_INT. This is a bug with the sources; I will file this upstream.

org/apache/fop/pdf/AlphaRasterImage.java:

  143           //...and write the Raster line by line with a reusable buffer
  144           int dataType = alpha.getDataBuffer().getDataType();
  145           if (dataType == DataBuffer.TYPE_BYTE) {
  146               ...
  151           } else if (dataType == DataBuffer.TYPE_INT) {
  152               ....
  168           } else {
  169               throw new UnsupportedOperationException("Unsupported DataBuffer type: "
  170                       + alpha.getDataBuffer().getClass().getName());
  171           }

Comment 6 Lillian Angel 2008-09-17 16:50:18 UTC
Fixed upstream. Will be updated when the next version of fop is released.

Comment 7 Bug Zapper 2009-06-10 02:40:43 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Bug Zapper 2009-07-14 14:26:49 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 9 Murray Cumming 2009-08-05 08:51:31 UTC
This seems to be fixed in Fedora 11. Thanks.

I can't see how to change the status from WONTFIX to fixed.

Comment 10 Murray Cumming 2009-09-22 15:31:07 UTC
Actually, this particular test case is still a problem on Fedora 11. It's apparently fixed in fop's svn, but I guess they need to do a new release:
https://issues.apache.org/bugzilla/show_bug.cgi?id=45795

Comment 11 Bug Zapper 2009-11-18 08:22:33 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Bug Zapper 2010-04-27 12:14:16 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Bug Zapper 2010-06-28 10:44:26 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.