Irv Salisbury III wrote:
I apologize if I came across as accusational.
No problem, I just thought I should supply some background.
I was trying to
understand the code so I knew the ramifications of creating a REST style
interface for my dynamically generated images. You have answered my
question.
There's more, see below.
It seemed like most of the readers would read the image into memory.
So, one thought on an "enhancement" might be to always read the bytes in
from the URL and then just hand that off instead of opening the URL again.
A simple solution which may run into ressource problems for high
resolution bitmaps, where you have to keep both the raw data as well
as the processed image object in memory.
Of course, this doesn't allow for future enhancements where it doesn't
need to read the whole thing into memory.
If I implement somethign like this, I would happily donate it back.
Thanks,
There are further considerations regarding image data retrival, which
have been left to implementors by the FO spec.
The same URL for retrieving an image may be used in several
external-graphic FOs, and the same external-graphic FO may be
rendered multiple times (as a child of static content, or if pulled
into static content by a marker reference). This begs the question
of how often the URL is accessed, with three obvious general
strategies:
- exactly once per unique URL in the whole FO document
- exactly once per external-graphic FO
- each time an external-graphic FO is rendered
Independent image caching complicates the issue: image data may be
discarded from the cache and retrieved again later. Technical issues
like layout backtracking and out-of-order rendering of pages add
further complexity. A special case may be an output format which doesn't
require retrieving content at all (think of SVG where the FO URLs are
copied through to the XLinks).
Have fun
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]