I am trying to change the width and height of an image.
This is how i am trying to do it.:
- Code: Select all
function HandlePix($pic,$CountNum){
$upload_path = "q/";
$filearray = explode(".",$pic);
$extension = end($filearray);
$pictn = $CountNum.'tn.'.$extension;
$tmptn = $CountNum.'tmp.'.$extension;
// copy($upload_path.$pic,$upload_path.$pictn);
$size = getimagesize($upload_path.$pic);
$tmppath = $upload_path.$tmptn;
$tnpath = $upload_path.$pictn;
$bgpath = $upload_path.$pic;
system("djpeg $bgpath >$tmppath");
system("pnmscale -xy 250 200 $bgpath | cjpeg -smoo 10 -qual 50 >$tnpath");
}
It creates a temp image with no size.
I am using php 4.2.2, winnt and apache 1.3
(For some reason imagecopyresized returns an error : function undefiend.
This is the reason I am trying to do it this way)

