cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasha Joachimsthal" <j.joachimst...@hippo.nl>
Subject RE: Apologies
Date Wed, 10 May 2006 07:51:55 GMT
> -----Original Message-----
> From: Kamal Bhatt [mailto:kbhatt@tt.com.au]
> Sent: woensdag 10 mei 2006 4:19
> To: users@cocoon.apache.org
> Subject: Apologies
> 
> 
> 
>  I need to be more careful. Obviously, the above email was 
> not meant for 
> the mailing list. But now my mistake has been made:
> 
> I had the following pipeline:
> 
> <map:match pattern="images/*/**/*">
>   <map:read src="/data/content/tsg/cmsblocks/holidayImg/{2}/{3}" 
> mime-type="image/jpeg" type="image-op-resize">
>     <map:parameter name="size-width" value="{1}"/>
>     <map:parameter name="size-preserve-ratio" value="true"/>
>   </map:read>
> </map:match>
> 
> Now, this does not preserve ratio, but this does:
> 
> <map:match pattern="images/*/**/*">
>   <map:read src="/data/content/tsg/cmsblocks/holidayImg/{2}/{3}" 
> mime-type="image/jpeg" type="image-op-resize">
>     <map:parameter name="size-width" value="{1}"/>
>     <map:parameter name="size-height" value="1"/>
>     <map:parameter name="size-preserve-ratio" value="true"/>
>   </map:read>
> </map:match>
> 
> I have had a look for the ResizeOperation, and it looks like 
> it doesn't 
> need a height. Am I missing something?
> 

I once used this to resize jpegs (and it worked):

The reader:
<map:reader logger="sitemap.reader.ImageReader" name="imageresource" pool-max="32"
        src="org.apache.cocoon.reading.ImageReader"/>

The pipeline:
      <map:match pattern="/binaries/**.jpg"> <!-- so it won't match .gif or .png
etc -->
        <map:read type="image" 
          mime-type="image/jpg"
          src="/my-path-to-binaries/{1}.jpg">
          <map:parameter name="width" value="50%"/>
        </map:read>
      </map:match> 

You use size-width as parameter, I used width. Maybe that's the difference? Or are you using
an other reader?


Jasha Joachimsthal

---------

Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466 

jasha@hippo.nl
www.hippo.nl

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


Mime
View raw message