Re: RFI: Image_Resize
| From: | Peter Bowyer | Date: | Tue, 16 Apr 2002 13:16:19 +0000 |
| Subject: | Re: RFI: Image_Resize | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5560@lists.php.net to get a copy of this message | ||
Hello Alan,
At 11:17 AM 4/16/02 +0800, Alan Knowles wrote:
I think this would be a good next step - rename the class Image_Transform::Yes.
Ive added percentage '10%' and <1 (0.13) factor scaling, - the resizeX(n) are public methods, although Resize(0,n) sounds like it would be the first choice for alot of developers -I cant see any big issues with leaving resizeX public and having it as an 'added extra' anyway....Unfortunately the way you have coded this will prevent the imageMagick version from working. I am taking parts of the code and merging them with my version to get it working... will post code this evening, as I've got work to do this afternoon :-( The resizeX and resizeY are the core of the problem actually, so it's these that I'm having to deal with. The way you've written them in the GD version they'll scale the image rather than just resize that one dimension - and of course if the other function is called later then you don't want to continue resizing the images - the sizes need to be stored and the resize called only once. Can you think of a better name for the function _parse_input, as it's not very descriptive? I've tried _parse_size but that's not very nice either. Thanks for adding the error handling - I couldn't work out how the PEAR error stuff was supposed to work :-) When should one use $this->raiseError and when should one use PEAR::raiseError? You've used one in one file and the other in the other file. Regards, Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Glenbranter - Scottish narrow gauge in 009 http://glenbranter.narrow-gauge.co.uk --oOo--