These forums are provided for community interactions only. For official support please submit a support ticket.

You are not logged in.

  • Index
  •  »  / API
  •  » stuck trying to display iptc or exif

#1 2008-09-19 04:11:25

danbretl
New Member
From: New York
Registered: 2007-11-07
Posts: 6
Website

stuck trying to display iptc or exif

maybe it's just too late at night right now and my brain has stopped functioning, but i can not for the life of me figure out why it's not working when i'm trying to display exif or iptc information from an image.

is this not right?
(once you already have the content object, let's say named $image.)

Code:

$image_caption = $image->iptc["caption"];
echo $image_caption;

i don't know if anyone else is up / patrolling this forum at this hour, but if so, please point out my stupid mistake so i can move on.

Last edited by danbretl (2008-09-19 04:18:29)

Offline

 

#2 2008-09-20 22:22:41

danbretl
New Member
From: New York
Registered: 2007-11-07
Posts: 6
Website

Re: stuck trying to display iptc or exif

i thought this would be a rather easy and quick thing to answer... nobody yet? i've managed to move on to other issues so that i don't waste my time tinkering trying to find the solution to this silly problem, but still i'd like to get it figured out as soon as possible...

Offline

 

#3 2008-09-22 00:33:10

danbretl
New Member
From: New York
Registered: 2007-11-07
Posts: 6
Website

Re: stuck trying to display iptc or exif

37 views and not a single response?? please i know there must be people on these forums that have the easy answer, just take a minute to give it to me!

Offline

 

#4 2008-09-22 03:50:36

bdaily
Director director
From: Nixa, MO
Registered: 2006-03-15
Posts: 11841
Website

Re: stuck trying to display iptc or exif

Try:

Code:

$image_caption = $image->iptc->caption;
echo $image_caption;

Brad Daily
support.director[at]slideshowpro.net

Offline

 

#5 2008-09-22 04:33:14

danbretl
New Member
From: New York
Registered: 2007-11-07
Posts: 6
Website

Re: stuck trying to display iptc or exif

bdaily wrote:

Code:

$image_caption = $image->iptc->caption;
echo $image_caption;

thanks bdaily for posting a reply, but i was pretty sure i already tried that as despite the fact that it doesn't seem consistent with the API wiki documentation (which says that $image->iptc is an associative array) it seemed like the most likely possibility. i tried it again to be sure and it still didn't work.

are you positive that is what's supposed to work? does that work on your server? is there something wrong with the php setup of mine? it's possible i don't have iptc/exif access enabled in my php config but i'm almost positive that i was successful in doing this before on the same server. (yes, i very much wish i hadn't deleted that test script.)

Offline

 

#6 2008-09-22 21:12:07

bdaily
Director director
From: Nixa, MO
Registered: 2006-03-15
Posts: 11841
Website

Re: stuck trying to display iptc or exif

This works for me:

Code:

$album = $director->album->get(2);

foreach($album->contents[0] as $image) {
    echo $image->src . ' - ' . $image->iptc->caption . '<br />';
}

Brad Daily
support.director[at]slideshowpro.net

Offline

 

#7 2008-09-26 00:25:40

danbretl
New Member
From: New York
Registered: 2007-11-07
Posts: 6
Website

Re: stuck trying to display iptc or exif

hm, well, that solution definitely isn't working for me... would you suggest that my php settings are not correct? i'd be very surprised, but i guess it's possible. is there an easy way to check this?

Offline

 

#8 2008-11-13 10:50:04

dwijadas
Member
Registered: 2008-11-08
Posts: 23

Re: stuck trying to display iptc or exif

it works for me. could it be EXIF info are missing. maybe cleaned while uploading. If you are using windows PC, you can right click and check if the image still have those info attached.

Just my cents.

Good luck !

Offline

 

#9 2008-11-14 10:06:00

Chelle
New Member
Registered: 2008-01-31
Posts: 12

Re: stuck trying to display iptc or exif

Quick way to check it in php is to do a echo print_r ($image)

You can see if the array holds the IPTC information.

//Chelle

Offline

 
  • Index
  •  »  / API
  •  » stuck trying to display iptc or exif

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson