I have tried to do this rasterization, but I cant get the code/parameters right. How do I easily make this rasterization at a lower resolution ? Since I am really stuck, code samples would be gratefully accepted. For now, my code just looks like :
// create a JPEG transcoder TIFFTranscoder transcoder = new TIFFTranscoder(); // create the transcoder input String svgURI = new File("Images/TestImage.svg").toURL().toString(); TranscoderInput input = new TranscoderInput(svgURI); // create the transcoder output OutputStream ostream = new FileOutputStream("Archived_Images/TestImage.tif"); TranscoderOutput output = new TranscoderOutput(ostream); // save the image transcoder.transcode(input, output); // flush and close the stream then exit ostream.flush(); ostream.close(); System.exit(0); So could the helping hand show me where/how to fill in the missing code to do this lower reolution approach ? As I wrote before, I dont know which classes/librairies/methods to use... Thanks in advance /Gergely -----Original Message----- From: Thomas DeWeese [mailto:[EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:35 PM To: Batik Users Subject: Re: Compress created TIFF-image Thomas DeWeese wrote: > Gergely Hajdu wrote: >> I have created a TIFF-image by converting a svg-file(called Image.xml) >> to a TIFF : >> >> My problem is that the image is WAY to big in bytesize (4GB..). >> I would need to compress it to app. max 50 000 bytes. >> How do I compress this image as MUCH as possible ? So I thought about this again, I missed a factor of 1000. You are asking for about 100,000 to 1 compression. Your 4GB image must be around 30,000 by 30,000 pixels who gave you a requirement of 50K bytes? It's insane! Perhaps you really want to rasterize the image at a lower resolution? Like screen resolution? This would make a _lot_ more sense with the 50K figure. > I don't know that you will succeed in compressing by over 100 to 1! > But for these sorts of large images you really want to use the > 'tiled image transcoder' that you can find in the contrib directory > of the Batik source dist. > >> I have looked at "org.apache.batik.ext.awt.image.codec.tiff", >> where I can compress the image,but I don't know how to "glue" this >> together >> with my created image ? > > > As a bonus the tiled Image transcoder exposes the TIFFImageEncoder > class directly so you can create TIFFEncodeParam. You could try using > deflate compression but I think you will only get close to the 100:1 > compression using JPEG. But I really think your goal is totally > out of bounds. > >> Probably I have to do some manipulating with the transcoder before >> transcoding the image ? >> >> Thanks in advance ! >> /Gergely >> >> >> >> --------------------------------------------------------------------- >> 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] --------------------------------------------------------------------- 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]