Hello Everyone,
I’ve got a dir of .jpg’s and want to display a thumbnail and then I’ll add a filename and description to the pics via a table. That part is easy! First part of displaying the ‘nail is screwing me up!!! I’m getting raw ASCII being dumped to the browser. I’m using IE 7 and here’s the code thus far, please help and all is appreciated.
Thank You,
Barrie
<?php
echo “header(‘Content-type: image/jpeg’)”;
$numfiles = 0;
$files = array();
foreach ($files = glob(“./incoming/*.jpg”) as $filename) {
// Get each file
$filename = $files[$numfiles];
$percent = 0.25;
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
imagejpeg($image_p, null, 100);
// End of ForEach
}
?>
What am I missing??? ?