LONTE SHELL EDITION


Dashboard -*- SHOW INFO -*- HASH identify -*- Config -*- Jumping

You Are Here : /var/www/virtual/tvarditsa.org/
Upload File :
Current File : /var/www/virtual/tvarditsa.org/vimg.php

<?php
#$im = imagecreatefromjpeg($img);
#Imagejpeg($im,'',10);
#ImageDestroy($im);


$filename = "vimg/".$_GET[id].".jpg";


if (!file_exists($filename)) {

$filename = "nimg/nophoto.jpg";
}


header('Content-type: image/jpeg');

// Get new sizes
list($width, $height) = getimagesize($filename);

if ($width>$height){
$perc = $height / 100;
} else {
$perc = $width / 100;
}



$newwidth = $width / $perc;
$newheight = $height / $perc;

// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);

// Resize
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);

// Output
imagejpeg($thumb, '', 80);
?>