You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by lfhc <lu...@gmail.com> on 2007/06/18 13:21:11 UTC
Image treatment
Hi,
I needed to have some image treatment done, and I've been looking through
ImageReader. Yet, my assumption is that this module only gets images from a
filesystem, and I needed to get them through an http source.
For example, I have a content source for news, that gives me an url for the
images uploaded. With that content source, I want to build html pages, but
that image url cannot be the original one, but one from cocoon, and, if
possible, have some resizing done.
Can anyone point me in the right direction please?
Thank you,
Best Regards,
Luis Carvalho.
--
View this message in context: http://www.nabble.com/Image-treatment-tf3939701.html#a11173889
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Image treatment
Posted by Grzegorz Kossakowski <gk...@apache.org>.
lfhc pisze:
> Hi,
> what I'm trying to do is to transform this :
>
> <xml ...
>
> <image>http://sourceurl/path/image.jpg</image>
>
> to
>
> http://cocoonurl/image.jpg where this image is resized.
You need something like this:
<map:match pattern="images/**"
<map:read type="image-op-scale" src="cached:http://sourceurl/{1}?cocoon:cache-expires=60&cocoon:cache-name=cached-images"/>
</map:match>
This way you will get proxy-like behaviour thanks to Cocoon's cached: protocol thus avoiding re-downloading original images again and again.
For description of cached source, take a look at:
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/source/impl/CachingSource.html
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Image treatment
Posted by lfhc <lu...@gmail.com>.
Hi,
what I'm trying to do is to transform this :
<xml ...
<image>http://sourceurl/path/image.jpg</image>
to
http://cocoonurl/image.jpg where this image is resized.
Thank you,
Best Regards,
Luis Carvalho.
Geert Josten wrote:
>
> Could you give more hints about what you are trying to achieve exactly.
> To my knowledge, it should be possible to read with any protocol known
> to Cocoon, but where should the result go, once transformed? And are you
> trying to process multiple images in one pass? Try transforming just one
> for starters..
>
> Kind regards,
> Geert
>
>>
>
>
> Drs. G.P.H. Josten
> Consultant
>
>
>
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665 JZ Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> www.daidalos.nl
> KvK 27164984
>
>
> De informatie - verzonden in of met dit emailbericht - is afkomstig van
> Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
> dit bericht kunnen geen rechten worden ontleend.
>
>
>> From: lfhc [mailto:luisfhcarvalho@gmail.com]
>> Sent: maandag 18 juni 2007 13:21
>> To: users@cocoon.apache.org
>> Subject: Image treatment
>>
>>
>> Hi,
>> I needed to have some image treatment done, and I've been
>> looking through ImageReader. Yet, my assumption is that this
>> module only gets images from a filesystem, and I needed to
>> get them through an http source.
>>
>> For example, I have a content source for news, that gives me
>> an url for the images uploaded. With that content source, I
>> want to build html pages, but that image url cannot be the
>> original one, but one from cocoon, and, if possible, have
>> some resizing done.
>>
>> Can anyone point me in the right direction please?
>>
>> Thank you,
>> Best Regards,
>> Luis Carvalho.
>> --
>> View this message in context:
>> http://www.nabble.com/Image-treatment-tf3939701.html#a11173889
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
--
View this message in context: http://www.nabble.com/Image-treatment-tf3939701.html#a11174965
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Image treatment
Posted by lfhc <lu...@gmail.com>.
Hi,
what I'm trying to do is to transform this :
<xml ...
<image>http://sourceurl/path/image.jpg</image>
to
<html img tag src=http://cocoonurl/image.jpg> where this image is resized.
Thank you,
Best Regards,
Luis Carvalho.
Geert Josten wrote:
>
> Could you give more hints about what you are trying to achieve exactly.
> To my knowledge, it should be possible to read with any protocol known
> to Cocoon, but where should the result go, once transformed? And are you
> trying to process multiple images in one pass? Try transforming just one
> for starters..
>
> Kind regards,
> Geert
>
>>
>
>
> Drs. G.P.H. Josten
> Consultant
>
>
>
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665 JZ Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> www.daidalos.nl
> KvK 27164984
>
>
> De informatie - verzonden in of met dit emailbericht - is afkomstig van
> Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
> dit bericht kunnen geen rechten worden ontleend.
>
>
>> From: lfhc [mailto:luisfhcarvalho@gmail.com]
>> Sent: maandag 18 juni 2007 13:21
>> To: users@cocoon.apache.org
>> Subject: Image treatment
>>
>>
>> Hi,
>> I needed to have some image treatment done, and I've been
>> looking through ImageReader. Yet, my assumption is that this
>> module only gets images from a filesystem, and I needed to
>> get them through an http source.
>>
>> For example, I have a content source for news, that gives me
>> an url for the images uploaded. With that content source, I
>> want to build html pages, but that image url cannot be the
>> original one, but one from cocoon, and, if possible, have
>> some resizing done.
>>
>> Can anyone point me in the right direction please?
>>
>> Thank you,
>> Best Regards,
>> Luis Carvalho.
>> --
>> View this message in context:
>> http://www.nabble.com/Image-treatment-tf3939701.html#a11173889
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
--
View this message in context: http://www.nabble.com/Image-treatment-tf3939701.html#a11174965
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Image treatment
Posted by Geert Josten <ge...@daidalos.nl>.
Could you give more hints about what you are trying to achieve exactly.
To my knowledge, it should be possible to read with any protocol known
to Cocoon, but where should the result go, once transformed? And are you
trying to process multiple images in one pass? Try transforming just one
for starters..
Kind regards,
Geert
>
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
> From: lfhc [mailto:luisfhcarvalho@gmail.com]
> Sent: maandag 18 juni 2007 13:21
> To: users@cocoon.apache.org
> Subject: Image treatment
>
>
> Hi,
> I needed to have some image treatment done, and I've been
> looking through ImageReader. Yet, my assumption is that this
> module only gets images from a filesystem, and I needed to
> get them through an http source.
>
> For example, I have a content source for news, that gives me
> an url for the images uploaded. With that content source, I
> want to build html pages, but that image url cannot be the
> original one, but one from cocoon, and, if possible, have
> some resizing done.
>
> Can anyone point me in the right direction please?
>
> Thank you,
> Best Regards,
> Luis Carvalho.
> --
> View this message in context:
> http://www.nabble.com/Image-treatment-tf3939701.html#a11173889
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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