jamesp0tter
Programmer
well, i'm trying to use the following code:
$netpbm = "/usr/local/netpbm/bin/"; // netPBM bin path
$to = "/tmp/"; // path where pics are and pics go
system ($netpbm."jpegtopnm $to"."pic.jpg > $to"."temp.pnm",$r);
echo $r."<br><br>";
system ($netpbm."pnmscale -xysize 150 150 $to"."temp.pnm",$r);
echo $r."<br><br>";
system ($netpbm."pnmtojpeg -quality=60 ".$to."temp.pnm > ".$to."thumb.jpg",$r);
okey, i have pic.jpg with 500x500.
all $r's return 0, so no problem there.
when i try to open thumb.jpg, the file has the exact width/height as pic.jpg, with the quality reduced to 60 and consequent filesize reduction because of the last command.
so, my guess is that pnmscale isn't working right ( ? )
or i have the wrong arguments...
any help out there ?
tks
$netpbm = "/usr/local/netpbm/bin/"; // netPBM bin path
$to = "/tmp/"; // path where pics are and pics go
system ($netpbm."jpegtopnm $to"."pic.jpg > $to"."temp.pnm",$r);
echo $r."<br><br>";
system ($netpbm."pnmscale -xysize 150 150 $to"."temp.pnm",$r);
echo $r."<br><br>";
system ($netpbm."pnmtojpeg -quality=60 ".$to."temp.pnm > ".$to."thumb.jpg",$r);
okey, i have pic.jpg with 500x500.
all $r's return 0, so no problem there.
when i try to open thumb.jpg, the file has the exact width/height as pic.jpg, with the quality reduced to 60 and consequent filesize reduction because of the last command.
so, my guess is that pnmscale isn't working right ( ? )
or i have the wrong arguments...
any help out there ?
tks