ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: [PATCH] Image scaling
Date Fri, 22 Aug 2003 09:27:50 GMT
OK - I have submitted your patch.
Since the image task is new (ant 1.6) I applied your patch as is, and
replaced completely the keepproportions attribute with the proportions
attribute. [rather than keeping a deprecated attribute].
I have had to change the testcase too.
It would be a good thing if you can supply testcases for the new
functionality.
Cheers,
Antoine
----- Original Message -----
From: "Rob Oxspring" <roxspring@imapmail.org>
To: "Ant Developers List" <dev@ant.apache.org>
Sent: Friday, August 22, 2003 2:17 AM
Subject: Re: [PATCH] Image scaling


Is there some problem with http://issues.apache.org/bugzilla/post_bug.cgi?
I wasn't able to create a bug in buzilla so for now I've had another go at
attaching the patch using .txt extension this time.

I've also patched the .html although the (huge!) class diagram image is now
out of date.

Rob

----- Original Message -----
From: "Antoine Levy-Lambert" <antoine@antbuild.com>
To: "Ant Developers List" <dev@ant.apache.org>
Sent: Thursday, August 21, 2003 7:08 PM
Subject: Re: [PATCH] Image scaling


> Rob :
> can you please create a bugzilla report with your patch ?
> I could not read you attachment anyway.
> Also include in your patch the docu if possible.
> Thanks in advance.
> Antoine
> ----- Original Message -----
> From: "Rob Oxspring" <roxspring@imapmail.org>
> To: <dev@ant.apache.org>
> Sent: Thursday, August 21, 2003 7:58 PM
> Subject: [PATCH] Image scaling
>
>
> First up, sorry for no unit tests - just doing enough to get by for now :)
>
> Anyway, I was using the image task to create thumbnails and couldn't
figure
> out how to keep proportions of an image but keep it within a fixed size.
My
> solution was to change the keepproportions attribute to be a little
> cleverer.  The keepproportions attribute is no more and has been replaced
by
> the proportions attribute has been added with the following features:
>
> proportions="ignore" - treat the dimensions independantly
> (==keepproportions="false" and is default)
> proportions="width" - keep proportions based on the width
> (==keepproportions="true")
> proportions="height" - keep proportions based on the height
> proportions="fit" - keep proportions and fit in the supplied dimensions
> proportions="cover" - keep proportions and cover the supplied dimensions
>
> So for example I can use the following to create thumbnails of my images
and
> make sure they all fit within the 160x160 size whether the image is
portrait
> or landscape.
>
> <image destdir="samples/low" overwrite="yes">
>     <fileset dir="samples/full">
>         <filename name="**/*.jpg"/>
>     </fileset>
>     <scale width="160" height="160" proportions="fit"/>
> </image>
>
> Hope that's helpful to others,
>
> Rob
>
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>



----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message