Michael Voyes wrote:
Thank you very much for your indications.
Now, i succesfully determine the cause of my problem. Apparently, the
last version of Batik (1.5.1) fix it.
So, i moved to Batik 1.5.1. Nevertheless, the logo.gif file (in color
mode) i want to rasterize remains in color in the TIFF dump.
How could i do to work with Batik in only Grayscale color mode
(grayscale is sufficiant for my application so in case of colored image,
i would transform them to grayscale) and thus save memory consumption
and get smaller Tiff file.
Well you are probably best off converting to grayscale after the
rendering is completed (SVG is heavily oriented around 4 band
image processing, 3 color + 1 alpha). If you are subclassing
ImageTranscoder you could try having the 'createImage' call create
a grayscale BufferedImage. If you are still using code similar to
what you posted earlier you could try tacking on an Any2LumRed in
the processing chain:
import org.apache.batik.ext.awt.image.GraphicsUtil;
import org.apache.batik.ext.awt.image.rendered.Any2LumRed;
RenderedImage img = f.createRendering(rc);
img = Any2LumRed(GraphicsUtil.wrap(img));
This will likely lead to a grayscale Tiff being written.
You might consider using PNG in this case as well (as it
may have better compression for your document).
Do i need to Specify it into the SVG Document ? If yes, what do i have
to put in it ?
Do i need to use a special command in batik ? If yes, which one ?
Do i need to modiy something in Batik ? If yes, where exactly ?
Thank you in advance for your assistance.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]