Re: RFI: Image_Resize

From: Date: Tue, 16 Apr 2002 12:42:47 +0000
Subject: Re: RFI: Image_Resize
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5557@lists.php.net to get a copy of this message
At 03:18 PM 4/15/02 +0800, you wrote:
$img->ResizeY(1024);
I quite like this as its very descriptive on what action is about to be taken. - dont really mind eather way though..
It's an extra line of code needed to resize an image - and anyhow, every other image function I've come across works with both x and y values.
the other option is just to use 0 - to indicate ignore, as if you sent 0 anyway it would be a 'stupid thing to do' :)
I think this is best practice.
I know - but GD doesn't support rotation, which is a pain. Basic text annotation tools may be useful as well: $im->addText(array('string' => 'This is text', 'x' => 100, 'y' => 100, 'font' => 'Verdana', size => 14));
actually I saw some code to do it in GD on the php manual comments - by copying the pixels :) - hopefully if the merge of GD into php goes ahead rotation can be added in at source though..
It would be nice. For the time being the function in the manual will do but of course it'll be much slower. 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--

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