[Phpwm] [OT] Any ideas how to do this?
phil at infolinkelectronics.co.uk
Fri May 26 11:18:22 BST 2006
> > Cheers Greg,
> > That's actually very near what I wanted indeed. Is there a way
> of making
> > it work both ways text1 -> text2 as now and also text2 -> text1
> > Couple of oddities on it though that I noticed -
> > On the default starting value of 300/200 if you put a leading zero in
> > front of the 300 then the 200 drops to 128 for some reason.
> > If there is no content in text1 text2 says "NaN" for some reason!
> has a couple of changes:
> both boxes now trigger the effect, and the error-handling is a little
> I might have been a little over-zealous in my use of parseInt, as I
> noticed some odd roundings, so might want to try with parseFloat
> in place
> of at least some of them.
Cheers - I owe you a pint at the next users group meeting!
I'll give it a good bashing about later today and make such thay the numbers it gives relate to the image resize / mogrify results with Imagemagick and tweak as required. It should be just about the last bit of that page in my CMS then, its a facility to allow users to upload and resize images either as a set of pre-sized or one user defined sized image on the fly for inclusion into pages on the site.
The idea of preserving the aspect ratio on resize is quite important as it's designed to be used by totally non-technical users! :-)
More information about the Phpwm