/    Sign up×
Community /Pin to ProfileBookmark

Does anyone know…

Does anyone know what the highlighted [B]80[/B] means in the code below:

[code=php]$name = $_FILES[$fieldname][‘name’];
$temp_name = $_FILES[$fieldname][‘tmp_name’];
$newwidth = 400;
// make a unique filename for the uploaded file and check it is not taken, try again if so
$now = time(); //current time stamp
$path_parts = pathinfo($_FILES[$fieldname][‘name’]);
$uploadFilename = $uploadsDirectory . $now . “.” . $path_parts[“extension”];

$size = getimagesize($temp_name);

if(preg_match(“~.jpg$~”, strtolower($name)))
$img = imagecreatefromjpeg($temp_name);

$round = round( $size[1] / ($size[0]/$newwidth));
$trumb = imagecreatetruecolor($newwidth, $round);
imagecopyresampled($trumb, $img, 0, 0, 0, 0, $newwidth,$round, $size[0],$size[1]);
imagejpeg($trumb, $uploadFilename, 80); //what does this 80 mean
imagedestroy($trumb);[/code]

thanks in advance

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@chazzyApr 29.2008 — http://us2.php.net/imagejpeg

The third parameter is "quality"
Copy linkTweet thisAlerts:
@oo7mlauthorApr 29.2008 — cool... thanks is there a big difference between having it at 90 instead of 80
Copy linkTweet thisAlerts:
@apulmca2k4Apr 30.2008 — This is size Of file in KB.
×

Success!

Help @oo7ml spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...