Hi

The workflow is following:

- I create many images like file://c:/a/1/temp.gif, file://c:/a/2/temp.gif
and file://c:/a/3/temp.gif
- I add the path's to my xml structured document
- I transform this document and an accordingly xsl to and tmp.fo file
- this fo-file will be rendered for print-preview via an AWTRenderer
Subclass
- I call reset on Driver, my renderer and set new inputsource etc.

On batch printing this workflow repeats x-times and for every rendering
process the image-files will be created in the same way. That means,
independant on how many gifs I've to produce for the current preview, all
files are located in folder "a" and all files are named temp.gif. Only the
directory which holds the file is (incremetal) different, but starts for
each preview with "1". After the preview is done the directory file://c:/a
and all child files will be removed from the computer.

The first Preview works correct, but if I try to go the same way more than
one times, all following AWT-rendered Images are scaled to the size
calculated to the first loading of file://c:/a/1/temp.gif ...., but the size
and contents of the file has changed completely.

The FopImageFactory maps the String representation of the image URL to the
calculated FOPImage. On request it returns the wrong FOPImage, because of no
check for last modified date ore something is done. That means the ImageArea
which is constructed on rendering process has the wrong dimensions.
AWTRenderer's renderImageArea(ImageArea) method loads the correct (actual)
image from the URL and the direct drawing from Graphics2D will scale the
image into the shape-dimensions of the obsolete FOPImage.
The results are funny if the first picture has a dimesion of 100x800 points
and the second one (with exactly the same url) has 600x200 points.

Hope that helps

cu Torsten

> -----Original Message-----
> From: Arved Sandstrom [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 15. Mai 2002 12:29
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: garbage collection on reset
>
>
> Hi, Torsten
>
> All points are noted.
>
> I am not sure I understand what you want to see in the case
> of modified
> images. In the general case, as soon as you change the dimension of an
> image, you might potentially have to recalculate _all_
> layout. The rendering
> cannot independently start using a new image size.
>
> I think I am missing something. Can you describe this scenario in more
> detail? It sounds like a good use case.
>
> Regards,
> Arved Sandstrom
>
> > -----Original Message-----
> > From: Torsten Erler [mailto:[EMAIL PROTECTED]]
> > Sent: May 15, 2002 6:23 AM
> > To: Fop-Dev (E-mail)
> > Subject: garbage collection on reset
> >
> > Can I (and if yes, how can I) configure the MEM_PROFILE_WITH_GC
> > variable on
> > StreamRenderer to run garbage collector every start and
> finish to save
> > memory on batch printing?
> >
> > Additional, please take a look on FopImageFactory. This
> class holds strong
> > references to every loaded image.
> > No reload and recalculate the dimension of the image (which
> has modified
> > since the last loading) is possible at any time. This is
> the cause why
> > modified images are scaled to the size of the first loaded image on
> > awt/print rendering.
> > I've overriden the class to disable the caching complete
> (Batch printing
> > uses 500++ MB!!! memory usage after loading 20 to 30 images
> and it crashes
> > due to OutOfMemoryError).
> > I don't know whether this is fixed in your current project
> status, if yes
> > ignore this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to