Hi Jeremias,

Jeremias Maerki wrote:
Adrian,

I'm seeing the warning in the subject when rendering some of the
external-graphic-* test cases to AFP.

I've got a few questions:
- Why is this warning?

This is because TIFF images are currently set to be not includable in the 
Registry.

- Isn't there something incorrect if you indicate GIF or JPEG as object
type when the object is actually a IOCA object and not a GIF or JPEG
file? For CCITT TIFFs the same applies because not the whole TIFF file
with its record structure is embedded but only the compressed CCITT data
stream. I'd only expect a JPEG object type if the image is actually
embedded as a JPEG file (like in PDF) which is currently not the case.

Strictly speaking I should probably be using an ObjectContainer instead.  This 
should be a small change.

- Why shouldn't a TIFF file not be includable as a resource in the first
place?

I seemed to recall when reading the MO:DCA reference that TIFF was not supported with an IOB (include object). But after reading the spec again and trying out the external-graphic_tiff test case it does work in the AFP Workbench and also prints without error. Including the object does however break one of my other test tools (AFP Lookup) but I guess this isn't so important.

BTW, CCITT-encoded images don't seem to work at all right now in the
GOCA branch. Are you aware of that?

No I wasn't, it seems to work ok in trunk - there is a regression there I'll take a look. BTW I ran the external-graphic_tiff.xml test on the 0_95 branch for comparison but was unable to as the ImageManager seemed to have a problem loading the image so there seems to be a problem there.

SEVERE: Error while processing image: ../../resources/images/bgimg300dpi.tif 
(image/tiff)
org.apache.xmlgraphics.image.loader.ImageException: Cannot load image (no suitable loader/converter combination available) for ../../resources/images/bgimg300dpi.tif (image/tiff)
        at 
org.apache.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java:248)
        at 
org.apache.fop.render.afp.AFPRenderer.drawImage(AFPRenderer.java:1019)
        at 
org.apache.fop.render.AbstractPathOrientedRenderer.drawImage(AbstractPathOrientedRenderer.java:758)
        at 
org.apache.fop.render.afp.AFPRenderer.renderImage(AFPRenderer.java:1326)
        at 
org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java:743)
at org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPathOrientedRenderer.java:621)
        at 
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:626)
        at 
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:601)
        at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:536)
        at 
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:573)
        at 
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:526)
        at 
org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:424)
        at 
org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:577)
        at 
org.apache.fop.render.afp.AFPRenderer.renderFlow(AFPRenderer.java:647)
        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.afp.AFPRenderer.renderRegionViewport(AFPRenderer.java:457)
        at 
org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:255)
        at 
org.apache.fop.render.afp.AFPRenderer.renderPage(AFPRenderer.java:700)
        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 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:309)
        at org.apache.xalan.templates.ElemCopy.execute(ElemCopy.java:166)
        at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
        at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
        at org.apache.xalan.templates.ElemCopy.execute(ElemCopy.java:162)
        at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
        at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
        at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
        at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
        at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
        at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
        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:197)



Thanks,
Jeremias Maerki



Reply via email to