Hi Thomas,
Thomas E Deweese wrote: > >>>>> "FI" == Felicia Ionascu <[EMAIL PROTECTED]> writes: > > FI> I had a very unpleasant surprise when monitoring the memory > FI> consumption for a simple call on a TIFFTranscoder.transcode(..). > FI> The image is 992 x 1403 pixels and I was expecting at max > FI> allocated 5MB of RAM. What I got was about three times more: about > FI> 18MB! > > FI> I searched in the sources, there are images created everywhere, in > FI> StaticRenderer, in ImageTranscoder... > > Please remember, contributions are always welcome. Everyone has a > different itch to scratch. I think what's missing at this moment is a transcoder that returns a BufferedImage - an image in a "pure" format. What's also missing is being able to do all this with a black-and-white or other image type. Now, if you use the TIFFTranscoder, it creates an ARGB image, four times larger than a graylevel one. > FI> Not to mention what happens if we want to create a multipage TIFF > FI> afterwards, as all the pages are kept in memory before being > FI> written out. > > If you are doing multi-page TIFF then what is kept in memory or > not as pages are written is really your issue not Batik's. You don't > have to generate full page buffers for each page ahead of time, you > can generate them on demand. That's what I finally did, transcoding only parts (bands) of the original SVG, then recomposing them to a final big image... But this final image still eats a lot of memory. > FI> There is no way of doing all this on the disk? It's very > FI> embarrasing if the amount of RAM is limited, and I don't think > FI> it's just the case of my application. > > I don't think you want to do it on the disk, you just want to do > it in a demand pull fashion. The rendering engine of Batik supports > this fully, it's just the current implementation of transcoders that > expect to work with full page buffers. > > I know this as I have generated 10kx20k Tiff images in the default > java partition, of course it takes writing some code, I haven't had > the time to generalize this and integrate it with the existing > transcoders but perhaps you would like to pick it up, polish it off > and contribute the result? I think it would be very interesting to have this in Batik and I'd like to give it a try. So please let me know how can I pick it up. Felicia -- ------------------------------------------------------------ Felicia IONASCU Oc� Print Logic Technologies mailto:[EMAIL PROTECTED] 1, rue Jean Lemoine phone : +33 (0)1 48 98 81 99 94015 Cr�teil cedex, France fax: +33 (0)1 48 98 54 50 http://www.oce.com/ ------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
