On 24.11.2008 16:11:00 Adrian Cumiskey wrote: > Hi Chris (and all), > > Chris Bowditch wrote: > > > Adrian, > > > > you've put a lot of work into the GOCA branch and it has some great > > features, but.... > > > > There's one thing I don't like, which Jeremias points out in this thread: > > > > http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/200811.mbox/[EMAIL > > PROTECTED] > > > > > > We currently use the PDF plugin in our software and I prefer not to > > upgrade the plugin without knowing what the justification the interface > > change is? > > Providing support for native image embedding in AFP involves providing the > image data (in whatever > form it may be) without any requirement for any image specific processing. > So there is one handler > which takes care of this in AFP, and this handler needs to declare itself > able to support the > handling of more than one image class. This use case was probably not > envisaged when the > PDFImageHandler interface was first introduced. Hope this explanation helps > :).
Let's look at that. There are: AFPImageHandlerRawCCITTFax handling ImageRawCCITTFax.class, priority 400 AFPImageHandlerRawStream handling ImageRawJPEG.class, ImageRawCCITTFax.class, ImageRawEPS.class, priority 100 AFPImageHandlerRenderedImage handling ImageBuffered.class, ImageRendered.class, priority 300 ImageBuffered is also a ImageRendered, so reporting the handling of ImageBuffered is unnecessary. ImageRawJPEG, ImageRawCCITTFax and ImageRawEPS all derive from ImageRawStream. Just reporting that class as supported class would have been enough. The ImageFlavors are there to indicate what formats are supported. Essentially, that means that the interface change was unnecessary. And is the AFPImageHandlerRawCCITTFax even used? It has a lower priority than AFPImageHandlerRawStream. So it seems that actually offers up an additional opportunity to resolve the whole problem. A shame I haven't taken a closer look earlier. I volunteer to revert the interface change and to change the plug-ins here so they still work as envisioned. That minimizes the regression testing necessary. After that, I'll vote +1 for the merge. Jeremias Maerki
