display exif thumbnail and comment on one webpage

Need help with Photoshop, the GIMP, Illustrator, or others? Want to show off your work? Looking for advice on your newest Flash stuff?

Moderator: General Moderators

Post Reply
baf
Forum Newbie
Posts: 2
Joined: Fri Dec 31, 2004 6:38 am
Location: EU

display exif thumbnail and comment on one webpage

Post by baf »

hi,

i want to read the exif comment and thumbnail fields of an image and display them on a single website. however i don't have a clue how to do that. resetting the header probably wasn't more than a last desperate try..

with the code below the thumbnail gets displayed fine while the following text is not visible.

Code: Select all

<?php
   $thumb = exif_thumbnail ("testpic.jpg"); //thumb is a string
   header('Content-type: image/jpg');
   $thumb = imageCreateFromString($thumb);
   imagejpeg($thumb);
   imagedestroy($thumb);
   header('Content-type: text/html');
   echo "hallo";
?>
is there a way to display contents with different mime types?? could anyone give me a hint how to solve that problem?

thank you
baf

ps: and a happy new year 2005 :wink:


feyd | Help us, help you. Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]imagejpeg[/php_man] wrote:The filename argument is optional, and if left off, the raw image stream will be output directly.
baf
Forum Newbie
Posts: 2
Joined: Fri Dec 31, 2004 6:38 am
Location: EU

Post by baf »

sorry for not using the php-tags.

thanks for your answer, but it doesn't helb me solve my problem. i would just get the whole stream in textual form but cannot convert it to be displayed as an image.

baf
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you need a seperate script (or a fiddled version of that script to call as the image, which can then output the image stream. Otherwise, you just send an image stream with a bunch of junk (your html and text) attached.
Post Reply