Re: new IM driver for Image_Transform

From: Date: Sun, 26 May 2002 07:39:53 +0000
Subject: Re: new IM driver for Image_Transform
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-6420@lists.php.net to get a copy of this message
At 12:17 AM 5/26/02 -0700, Dan Allen wrote:
Okay, we are getting somewhere and this is good...let me make some final comments here... CMD.php is now System/Command.php and there should be a new release on the pear.php.net site soon...so I am able to make changes and I am going to try to get which() to be more useful on windows.
Good :-)
Let's go with if it is windows then we use the constant path (please document this constant) and if it is unix we can autodetect. But either way, we can pass a full path into the class as an override, regardless of the system.
Fine by me
As far as using exec(), please view the source code in System_Command/Command.php in the CVS tree. I have a full interface for capturing both stdout and stderr, with appropriate PEAR error objects being created. We should really use this class if we are going to run stuff from the commandline. I will help you with it if you are willing to look it over a bit first.
Will have a look - sounds like a good class to use.
The way to capture errors is as follows. You run yourcommand --option value 2>/tmp/errorfile Then you read the errorfile if the exit status was negative to find out if any errors were captured.
Another way would be to use ob_* to capture any message to sdout, but I'm guessing your way would be faster as we only read the file if the status is negative?
But given that these errors should never occur in production isn't this overkill? Error checking for the sake of it? Error checking is never overkill, it is proper...ask anyone here, PEAR error checking is sacred.
I think we'll have to agree to disagree here... I think that checking the quality level of an image lies between 0 and 100 is overkill and should be done at an application level or not at all (if you're daft enough to enter a negative value you'll soon find out when the PEAR error handler receives an error from convert). You think otherwise. That's fine, we'll just have to come to some agreement <cue for start of 100 years war> and as I'm lead developer for this package I'm God ;-D Will hopefully get some coding on the classes done today - unless I suffer a catastrophic data loss moving all this stuff to my new computer :-) Peter -- Maple Design - quality web design and programming http://www.mapledesign.co.uk

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