Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

netPBM » pnmscale PROBLEM

Status
Not open for further replies.

jamesp0tter

Programmer
Feb 20, 2003
119
PT
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.&quot;<br><br>&quot;;
system ($netpbm.&quot;pnmscale -xysize 150 150 $to&quot;.&quot;temp.pnm&quot;,$r);
echo $r.&quot;<br><br>&quot;;
system ($netpbm.&quot;pnmtojpeg -quality=60 &quot;.$to.&quot;temp.pnm > &quot;.$to.&quot;thumb.jpg&quot;,$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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top