0

i want to fix the image size, becaz if image size is too large then it will take more loading time so i have to reduce that. someone help me to do image scaling method. if size of image width is 800px and i want it in 300px width what should i do for that while uploading

2
Contributors
4
Replies
14
Views
3 Years
Discussion Span
Last Post by malatamil
0

How are you uploading? Some upload tools resize for you. If you programmed this yourself, use GD or Imagick to resize.

0

i have no idea about that. if i upload any size of image and i need to fix that image size

$uploadDir = '/upimg/videoimg/';

$imagename = $_FILES['videoimage']['name'];
$tmpname = $_FILES['videoimage']['tmp_name'];

$filePath = $uploadDir . $imagename;
$result = move_uploaded_file($tmpname, $filePath);

$myInputs = $_POST["videopath"];
$sql = mysql_query("INSERT INTO homepage_video_ads (videoImage,videoPath,Date)VALUES ('$imagename','$myInputs',NOW())");
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.