xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gergely Hajdu" <gha...@abprodata.com>
Subject Set Height and Width in pixels for rendered image
Date Fri, 05 Dec 2003 10:02:16 GMT

I am using  FOP-driver together with these packages :

com.multiconn.fop AND

I am generating TIFF-images by the following code :

// Set up parameters for the renderer
tiffRenderer = TIFFRendererFactory.newTIFFRenderer(  );
TIFFRendererParams params = new TIFFRendererParams(  );
params.setDeflateLevel( Deflater.BEST_COMPRESSION );
params.setCompression( TIFFRendererParams.COMPRESSION_PACKBITS );

// Set parameters to renderer
tiffRenderer.setRenderParams( params );

// Create output location for the created TIFF-image
RandomAccessFile cachedTiff = new RandomAccessFile( outputFile,"rw" );
OutputStream out = new SeekableOutputStream( cachedTiff );

// Run the driver and render the TIFF-image
driver = new Driver( new InputSource( "ftl_templates" + fileSeparator +
".tif" ),out );
driver.setRenderer( tiffRenderer );
driver.run(  );

My problem is that the rendered TIFF gets quite big. Uncompressed it is like
approximately ( 30000 * 30000 pixels ). What I would like to do is to set
some kind
of height and width to the rendered TIFF, so it is like 1024*768 pixels (
I would like to write something like :

tiffRenderer.setHeight(1024); // TIFF-image height in pixels
tiffRenderer.setWidth(768); // TIFF-image width in pixels

Is there any way to do this ? Of course the src-code to doing maybe looks
different than
I wrote, but I hope you understand what I want to achieve.


To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org

View raw message