This patch ports the 0.20.5 CCITTFaxDecode filter functionality and its support of direct embedding on certain TIFF images to the trunk. It also cleans up some of the image handling with respect to consistent closing of the input stream to avoid dangling open files. There is most likely still a fundamental problem with respect to image decoding and the image cache left. As renderers differ in their ability to handle an image in its raw format or decoded the format, the image bitmap stored (raw or decoded) depends on the first renderer loading it. If in a subsequent invocation a different renderer get the same image from the cache it may not be in the format that the second renderer expects leading to undesirable results. I'll leave that for a later time.
Created attachment 16079 [details] Patch file
Created attachment 16080 [details] New class - src\java\org\apache\fop\pdf\CCFFilter.java
Created attachment 16081 [details] TIFF file with CCITT Group 4 encoding for testing Not sure where this file should go. It really belongs to some renderer testing resources. May be it can go into test/resources/images if this is the repository for all test images being it for layout or for render testing.
Applied. Thanks a lot for the patch. It looked very good. It should be possible to write a JUnit test case to check for the caching problem you think could be around. I haven't tested for that one, yet. As a side note: Direct CCITT support could also be added to the PostScript renderer as it supports this filter, too. Probably quite easy now.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed