/    Sign up×
Community /Pin to ProfileBookmark

Thumbnail display showing ASCII!!!

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 *
$percent;

// 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??? ?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@bokehApr 28.2007 — What am I missing??? ?[/QUOTE]That you can only serve one file and one mime type per request.
Copy linkTweet thisAlerts:
@BarrieHieauthorApr 28.2007 — Thank you sir but it's still doing the same thing! I've got an idea though...

I'll post the code if it works!

Thank You,

Barrie
×

Success!

Help @BarrieHie 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...