Re: RFI: Image_Resize

From: Date: Mon, 22 Apr 2002 05:35:43 +0000
Subject: Re: RFI: Image_Resize
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5717@lists.php.net to get a copy of this message
had a quick look through, the $image->ResizeX etc. Actually what I was aiming for in ResizeX & resizeY was probably closer to $image->scaleMaximumX($number | $factor) $image->scaleMaximumY($number | $factor) as resize in this context means more scale to exactly x and/or y and leave the other one alone if '0' and scale refers to a general resizeing proportionally. the other one was (not that I need it at present) $image->scaleInsideBox($x,$y); - to scale the image down so it fits inside a box of maximum $x and $y.. and I guess an option to say $image->setBorder($width, $color | default= NULL) - so that if it was scaled to fit a box, - if border color = '0' (and not '#000000') then there would be no border - if $border != 0 then it would have a border to fit the box + the border width - or similar..... I guess the need for defines is pretty silly as there is never going to be a performance issue with this library - it's never going to be in the top 10 fastest libraries :) so $image->setOption('IM_lib_dir','/home/me/bin/'); is probably the best way to set the local config. I also found that there was no way to easy detect GD2 - so ImageCreateTrueColor or ImageCreate would have to be done on a manual SetOption as well.. - $image->setOption('GD_version',1); // default is 2? the only other stuff is nitpicking on the Pear standards - the code I think should have spaces rather than tabs great stuff regards alan Peter Bowyer wrote:
OK everyone, a new version is available @ <http://www.narrow-gauge.co.uk/Image_Transform.tar.gz>. Please test and report any problems. Then I think it's nearly ready to be committed to PEAR :-) Peter. -- Maple Design - quality web design and programming http://www.mapledesign.co.uk


« previous php.pear.dev (#5717) next »