Sorry if these questions are too obvious.

En/na Jeremias Maerki ha escrit:
One more thing: The TIFFRenderer currently uses the internal codecs from
XML Graphics Commons to encode TIFF images.

I understand you are talking about org.apache.xmlgraphics.image.codec.tiff.TIFFImageEncoder in the method stopRenderer()

These do not support writing
CCITT-G4 encoded images. We could switch to the ImageWriters I wrote for
Batik and which are now available in XML Graphics Commons. They allow an
abstraction from the underlying codec for image writing. There are
implementations of the ImageWriter that write images through ImageIO

ImageIOTIFFImageWriter?

which might have CCITT-capable codecs available but the code will have
to be extended to choose the compression algorithm.

So you're talking about subclassing ImageIOTIFFImageWriter (into batik or into fop?) or adding code into? to use, for example, TIFFFaxDecoder?

All in all, no easy
solution to your requirement but certainly not much more than half a day
of work.

On 10.09.2006 12:54:46 Jeremias Maerki wrote:
There's a configuration value you can set to modify the compression used
but it's poorly designed (requiring an integer value) and undocumented.
Furthermore, it does not support setting CCITT-G4 compression.
Generating monochrome (1bit) images has also not been implemented, yet.

To implement all this, changes would have to be made in:
- Java2DRenderer.getPageImage(): Extract code into a protected method to
instantiate the BufferedImage that we paint on. Right now, it always
allocates an 24 bit RGB image with an 8-bit alpha channel.

OK

- TIFFRenderer.LazyPageImagesIterator.next(): Code to handle 1bit images.

Uncoment the code for TIFFEncodeParam.COMPRESSION_GROUP4? simply return the BufferedImage generated in the protected method above (I think is this one)? or some other hack?

- TIFFRenderer.configure(): provide better configuration using names for
compression methods.

What does this method does or have to do? I don't undertand why this method exists. It's reason is to log the compression?

- Override the new protected method described above to create the
Buffered image depending on the configuration.

OK


If you don't want to hack FOP code, the work-around is to convert the
generated TIFF file after generation to CCITT format somehow. Obvious,
isn't it? :-)

On 08.09.2006 11:04:22 Oliver Hernàndez Valls wrote:
Hi all,
I'm working with fop to generate MTIFF text images. At the moment i'm using fop-trunk because no justification functionality is working in fop 0.92 for tiffs. Right now I've all the functionality to generate parametrized text images implemented. By default fop uses packbits compression and colored image coding. I'd like to change the tiff coding to TIFF-G because generated images with the default tiff coding are very big (around 9000 kB) and coloration is not needed for the images I'm generating. I'm using the "new" FOUserAgent parameter setTargetResolution(int), but I can't see any way to change the default encoding for tiff images. Some time ago I readed this somewhere in the source code: "//TODO Support output of monochrome bitmaps (fax-style)", but don't know if it has something to do with changing tiff coding.

        Any hint/workarround/documentation please?

Thanks a lot, salut / cheers !

Jeremias Maerki


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Thanks a lot!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to