You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dean Maslic <de...@gmail.com> on 2005/07/04 15:54:09 UTC

reader implementation ideas ?

Hi,

Ive implemented an image-processor as a Reader component. The idea is
to get an image from the given src, do a transformation based on say
browser type and some input parameters and return transformed image to
client. The component is caching the transformed image using the
URI+browserType as the key.
What I would ideally like to do is cache the original image too, so
when different browsers request the same image I don't have to
retrieve the image from remote server but retrieve it from my local
cache, transform it, cache it as I do now and return to the client.

Is that possible ? Appreciate any ideas and suggestions

--Dean

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: reader implementation ideas ?

Posted by Unico Hommes <un...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you read the original image in a separate dedicated reader you should
get exactly what you want (provided they're both nested inside a caching
pipeline of course):

<match pattern="orig-*.img">
  <read type="resource" src="http://remoteserver/{1}.img"/>
</match>

<match pattern="transformed-*.img">
  <read type="image" src="cocoon://orig-*.img"/>
</match>

Or perhaps there was a problem with nested readers I don't know, I
vaguely remember some such. Does it work?

- --
Unico

Dean Maslic wrote:
> Hi,
> 
> Ive implemented an image-processor as a Reader component. The idea is
> to get an image from the given src, do a transformation based on say
> browser type and some input parameters and return transformed image to
> client. The component is caching the transformed image using the
> URI+browserType as the key.
> What I would ideally like to do is cache the original image too, so
> when different browsers request the same image I don't have to
> retrieve the image from remote server but retrieve it from my local
> cache, transform it, cache it as I do now and return to the client.
> 
> Is that possible ? Appreciate any ideas and suggestions
> 
> --Dean

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCya1Ecuec8tVNKAwRAouZAKC7/ECu4tekLbQVgj/OUulG2PdopQCeI17x
lcjCLXuUPHzJRfeUK3qnfdU=
=RlTa
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: reader implementation ideas ?

Posted by Andrew Franz <af...@optushome.com.au>.
In the case of photography, Jpeg cameras embed a 120x160 thumbnail in 
the file. Look up the 'EXIF' standard.
In the case of artwork, you can't be certain that the thumbnail is 
consistent with the full image.

Clients virtually always want the thumbnails along with the meta info.

Regards


Dean Maslic wrote:

>Hi,
>
>Ive implemented an image-processor as a Reader component. The idea is
>to get an image from the given src, do a transformation based on say
>browser type and some input parameters and return transformed image to
>client. The component is caching the transformed image using the
>URI+browserType as the key.
>What I would ideally like to do is cache the original image too, so
>when different browsers request the same image I don't have to
>retrieve the image from remote server but retrieve it from my local
>cache, transform it, cache it as I do now and return to the client.
>
>Is that possible ? Appreciate any ideas and suggestions
>
>--Dean
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org