Hi dear Jeremias,
Unfortunately, I have committed a new png with this icon, which is a bit
larger than the previous one (may be a couple of pixels) and FOP 0.94 "ate"
it without vomiting. The problem was really weird.
My best wishes,
Nancy
Jeremias Maerki-2 wrote:
>
> Nancy,
>
> I'm merging the new image package into FOP Trunk later today. That
> should improve the situation. However, I would still appreciate if you
> could send me the PNG that didn't work so I can make sure it will work
> with the new package. Thanks.
>
> On 31.12.2007 12:58:33 nancy_b wrote:
>>
>> Hi dear Jeremias! Any updates on this?
>>
>> My best wishes,
>> Nancy
>>
>>
>> Jeremias Maerki-2 wrote:
>> >
>> > There is a small percentage of PNG images that the standard ImageIO
>> > codecs don't load properly. So, it's not directly a FOP problem.
>> >
>> > The reason this appears in FOP 0.94 but not in 0.93 is that we switched
>> > from our internal PNG codec to the one from ImageIO because it's
>> faster.
>> > Only after that change did we notice that the ImageIO codec from Sun
>> has
>> > bugs.
>> >
>> > Work-around: To get the same behaviour as with FOP 0.93 you can change
>> > src/java/org/apache/fop/image/ImageFactory.java:
>> >
>> > Look for this:
>> > imt = new ImageMimeType("image/png");
>> > imageMimeTypes.put(imt.getMimeType(), imt);
>> > //Image I/O is faster and more memory-efficient than own codec
>> for
>> > PNG
>> > imt.addProvider(imageIoImage);
>> > imt.addProvider(pngImage);
>> >
>> > Now just exchange the last two lines above and recompile FOP:
>> > imt.addProvider(pngImage);
>> > imt.addProvider(imageIoImage);
>> >
>> > I'm currently refactoring the image package based on all the experience
>> > of the past. Things like that shouldn't happen anymore as I'm planning
>> > on writing a fallback mechanism so when an image cannot be loaded by
>> one
>> > codec, a different one is tried.
>> >
>> > You could help me if you sent me this PNG image so I can test with it.
>> > Thanks.
>> >
>> > Jeremias Maerki
>> >
>> >
>> >
>> > On 08.11.2007 13:08:27 nancy_b wrote:
>> >>
>> >> Hi guys,
>> >>
>> >> I upgraded to FOP 0.94, and now I can't compile a document that is
>> >> compiled
>> >> well with FOP 0.93. The following is the error message:
>> >>
>> >> Nov 8, 2007 1:57:22 PM org.apache.fop.image.ImageIOImage loadBitmap
>> >> SEVERE: Error while loading image: LUT has improper length!
>> >> java.lang.IllegalArgumentException: LUT has improper length!
>> >> at javax.imageio.ImageTypeSpecifier$Indexed.<init>(Unknown
>> >> Source)
>> >> at javax.imageio.ImageTypeSpecifier.createIndexed(Unknown
>> Source)
>> >> at
>> >> com.sun.imageio.plugins.png.PNGImageReader.getImageTypes(Unknown
>> >> Source)
>> >> at
>> com.sun.imageio.plugins.png.PNGImageReader.readImage(Unknown
>> >> Source)
>> >> at com.sun.imageio.plugins.png.PNGImageReader.read(Unknown
>> >> Source)
>> >> at
>> >> org.apache.fop.image.ImageIOImage.loadBitmap(ImageIOImage.java:98)
>> >> at
>> >> org.apache.fop.image.ImageIOImage.loadDimensions(ImageIOImage.java:68)
>> >> at
>> >> org.apache.fop.image.AbstractFopImage.load(AbstractFopImage.java:161)
>> >> at
>> >> org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:75)
>> >> at org.apache.fop.fo.FObj.processNode(FObj.java:125)
>> >> at
>> >>
>> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:320)
>> >> at
>> >> org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
>> >> at
>> >>
>> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
>> >> at
>> >> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>> >> Source)
>> >> at
>> >>
>> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>> >> Source)
>> >> at
>> >>
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
>> >> Source)
>> >> at
>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> >> Source)
>> >> at
>> >>
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> >> Source)
>> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >> Source)
>> >> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> >> Source)
>> >> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>> >> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>> >> Source)
>> >> at
>> >>
>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
>> >> at
>> >> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
>> >> at
>> >> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
>> >> at org.apache.fop.cli.Main.startFOP(Main.java:166)
>> >> at org.apache.fop.cli.Main.main(Main.java:197)
>> >> Nov 8, 2007 1:57:22 PM org.apache.fop.fo.flow.ExternalGraphic bind
>> >> SEVERE: Cannot read image dimensions: url(images/icon_plug_eth.png)
>> >> Nov 8, 2007 1:57:22 PM org.apache.fop.image.ImageIOImage loadBitmap
>> >> SEVERE: Error while loading image: null
>> >>
>> >> Note that this image is a small icon with dimensions 1*1 cm. Please,
>> >> advise!
>> >>
>> >> Regards,
>> >> Nancy
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/FoP-0.94-bug-tf4770550.html#a13645816
>> >> Sent from the FOP - Users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/FoP-0.94-bug-tp13645816p14556846.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/FoP-0.94-bug-tp13645816p14738567.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]