Image_Resize patches (2/2)
| From: | Brent Cook | Date: | Wed, 04 Sep 2002 19:11:19 +0000 |
| Subject: | Image_Resize patches (2/2) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8843@lists.php.net to get a copy of this message | ||
Peter,
This is a patch to correct a few issues with the NetPBM module. There
does not appear to be a 'pnmtogif' utility in NetPBM (I tested with v
10.8). This patch changes the logic to use to 'ppmtogif' utility. Again, I
can apply this if you like.
- Brent
--- Driver/NetPBM.php 2002-09-02 05:59:34.000000000 -0500
+++
/home/busterb/public_html/brentandtiffany.org/www/include/pear/Image/Transform/Driver/NetPBM.php
2002-09-03 19:54:22.000000000 -0500
@@ -142,16 +142,17 @@
$cmd = IMAGE_TRANSFORM_LIB_PATH . $this->type . 'topnm ' .
$this->image . '|' . implode('|', $this->command) . '|';
$arg = "";
switch($type){
- case 'jpeg':
- $arg = "--quality=$quality";
- break;
case 'gif':
$cmd .= IMAGE_TRANSFORM_LIB_PATH . "ppmquant
256|";
+ $cmd .= IMAGE_TRANSFORM_LIB_PATH . 'ppmtogif >' .
$filename;
break;
+ case 'jpeg':
+ $arg = "--quality=$quality";
default:
+ $cmd .= IMAGE_TRANSFORM_LIB_PATH . 'pnmto' . $type .
+ ' ' . $arg . '>' . $filename;
break;
} // switch
- $cmd .= IMAGE_TRANSFORM_LIB_PATH . 'pnmto' . $type . ' ' . $arg .
'>' . $filename;
exec($cmd);
$this->command = array();
} // End save