Hi, First,sorry about my english...
I want to take a picture that was upload from the user and change it pxl's, and rename it.
waht is happend to me is that the size is changing, but with blak, Imean that the area that was growing is in black instead that the picture will take place.
now if u look at my dont try to understand what i want to do' just try to focus about the blabk thing, hope u got me as i want to...
<?Header( "Content-type: image/jpeg");?>
<body bgcolor="#4b4b4b">
<?
$theType=explode('.',$theFile_name);//$theFile=the uploaded file from the user
$piciSize=2000;//the wanted size
$size=getimagesize($theFile);
$pxlWidth=$size[0];
while ($pxlWidth<$piciSize)
{
$pxlWidth++;
$pxlHight++;
}
if($theType[1]=='jpg')
{
$new=imagecreate($pxlWidth,$pxlHight);
$srcFile=imagecreatefromjpeg($theFile);
$theImage=ImageCopyResized($new,$srcFile,0,0,0,0,$pxlWidth,$pxlHight,im agesx($new),imagesy($new));
$newName='bb';
$saveTo='c:/apache/htdocs/art/upload/'.$newName.'.'.$theType[1];
imagejpeg($new,$saveTo,120);
}
?>
<img src="<?=$saveTo?>">
</body>