On 20.03.2005 20:41:13 Renaud Richardet wrote:
<snip/>
> > > For PNG, TIFF and Print, the quality of the output is _very_ poor. Am
> > > I using the right image type in
> > > Java2DRenderer.getPageImage(PageViewport pageViewport) ?
> > > Oleg used a TYPE_BYTE_BINARY, which seems to be the only type which
> > > works with the TIFFEncoder from Batik. See
> > > TIFFRenderer$LazyPageImagesIterator.next(). But the quality is poorer.
> > > Any hints?
> > 
> > Yes. Simply increase the bitmap size. Use
> > FOUserAgent.getPixelUnitToMillimeter() to calculate an enhanced
> > scaleFactor in Java2DRenderer.getPageImage() to support bigger
> > resolutions. Default resolution is 72dpi which explains the poor quality.
> > You should probably support an additional command line parameter that
> > enables the user to specify the resolution for the generated image.
> > Compare with [1]
> > 
> > [1] http://barcode4j.krysalis.org/cli.html
> 
> Thanks, I'll try that. 
> What about the image type? (TYPE_??) Which one fits the picture?

Well, it depends on what is desired. If you create a monochrome image
then obviously a binary type is preferred to minimize memory usage. We
might also want to distinguish grayscale and full color bitmaps (24bit
RGB). So we need a way to configure what kind of image is generated and
how it is serialized.

<snip/>
> > One more thing: Why did you include the codecs in the patch? Can't you
> > just use the ones in batik.jar? It worked fine here. If you have to make
> > any modifications to the codec please create an additional patch that
> > will be sent to the Batik team.
> 
> Oh yes, I forgot to remove that. (It was just a dirty trick to let
> eclipse access Batik's codec's code while debugging. BTW, if you know
> a better way, let me know...)

Download Batik from CVS as you do for FOP and set up the project in
Eclipse and reference it in your FOP project (second tab "Projects" in
"Java Build Path") instead of adding batik.jar to the project.

<snip/>

Jeremias Maerki

Reply via email to