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
Hi,

I am using  FOP-driver together with these packages :

com.multiconn.fop AND
com.multiconn.fop.codec

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.setWriteTiled(true);
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
4MB,
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 (
height*width).
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.

Regards
/Gergely




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


Mime
View raw message