Hmmm... I thought I restarted, maybe I didn't. The caching sounds bad
though. Is that a bug?
Cheers.
Kamal.
Jasha Joachimsthal wrote:
I tried the Imageop and it did scale right without size-height. I did notice
that Cocoon seemed to cache the result so when I changed size-preserve-ratio
from false to true it had no effect on the result unless I changed the values
of the parameters or restarted Cocoon. Maybe that was the reason you didn't see
a right scaled image. Declaring the mime-type wasn't necessary either.
Jasha Joachimsthal
---------
Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466
[EMAIL PROTECTED]
www.hippo.nl
-----Original Message-----
From: Kamal Bhatt [mailto:[EMAIL PROTECTED]
Sent: woensdag 10 mei 2006 10:01
To: [email protected]
Subject: Re: Apologies
As of 2.1.9 there is a new "reader" called imageop. Check out the
samples for it. I am using that. Imageop is causing me problems. If I
cannot get it to work, I may try your way.
Cheers.
Kamal.
Jasha Joachimsthal wrote:
-----Original Message-----
From: Kamal Bhatt [mailto:[EMAIL PROTECTED]
Sent: woensdag 10 mei 2006 4:19
To: [email protected]
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
[EMAIL PROTECTED]
www.hippo.nl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Kamal Bhatt
--
Disclaimer: This email is confidential and may contain
privileged information for the sole use of the person or
business to which it is addressed. If you are not the
intended recipient, please notify the sender by return e-mail
or phone as you must not view, disseminate, distribute or
copy this email without our consent. We do not accept any
liability in connection with any computer virus, data
corruption, incompleteness, or unauthorised amendment of this
email. It is the sole responsibility of the receiver to scan
for viruses before opening.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Kamal Bhatt
--
Disclaimer: This email is confidential and may contain privileged information
for the sole use of the person or business to which it is addressed. If you are
not the intended recipient, please notify the sender by return e-mail or phone
as you must not view, disseminate, distribute or copy this email without our
consent. We do not accept any liability in connection with any computer virus,
data corruption, incompleteness, or unauthorised amendment of this email. It is
the sole responsibility of the receiver to scan for viruses before opening.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]