Nav: Home
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 21:47

Login with username, password and session length

MicrostockGroup

Microstockgroup Sponsors


« previous next »
Pages: [1] Print

Topic: Display IPTC and/or EXIF under photos on my own website?  

(Read 685 times)
RacePhoto



« on: October 24, 2010, 09:06 »

I finally got around to hacking out a modification to someone else's Javascript, so I can display the make, model, shutter speed, ISO Etc. Which is fun and proof that it can be done. Eventually it's not that difficult when someone knows the names and how to access it. (not that I did that myself!)

Should you be interested, look at page 160 and 161 for naming convention and calls. This is the EXIF standards document in PDF.

http://dl.dropbox.com/u/8755020/exifStandard.pdf

Now the real deal.

Anyone know a way to extract the IPTC data for Description field and Caption (something easy for examples) and have it show under an image, when it displays on my own website. Before I go to all the trouble of finding it for myself, I thought it might just be easier to ask? Cheesy I know it's in there, I just don't know how to access and display it?


Ignore | Logged


DepositPhotos.com
FD



« Reply #1 on: October 26, 2010, 04:48 »

Code:
if(isset($info['APP13'])) {
$iptc = iptcparse($info['APP13']);
if (is_array($iptc)) {
$trtxt = ".,;?!&";
// title
$title = $iptc["2#005"][0];
$title = trim(trim($title),$trtxt);
// description
$description = trim($iptc["2#120"][0]);
$description = trim(trim($description),$trtxt);
// keywords
$lb_keywords = $iptc["2#025"];
if (count($lb_keywords) > 0) {
foreach ($lb_keywords as $key => $value) $lb_keywords[$key] = str_replace('"',"“",str_replace("'","’",trim(trim(strtolower($value)),$trtxt)));
} else {
$lb_keywords[0] = 'No keywords';
};

 Tongue


Ignore | Logged


RacePhoto



« Reply #2 on: October 26, 2010, 20:06 »

I'll try that one later tonight. I'm playing Buzztime trivia at BWW and it's 45c wing night.

THANKS


Ignore | Logged


Envateo Photo ToolsMicrostock Insider
Pages: [1] Print 
« previous next »
Jump to:  


Related Topics
Subject Started by Replies Views Last post
EXIF vs IPTC tags
General Stock Discussion
fintastique 4 1374 Last post April 05, 2006, 12:38
by Stepunk
Best usable site:display
Site Related
snem 3 1081 Last post November 28, 2006, 16:45
by a.k.a.-tom
extracting EXIF/IPTC data online?
General Photography Discussion
cascoly 14 2535 Last post February 12, 2010, 12:41
by cascoly
Using my stock photos on my personal website allowed?
General Stock Discussion
TeamC 10 1379 Last post April 06, 2010, 03:17
by holgs
Website with free stolen photos « 1 2 »
Image Sleuth
isselee 26 3650 Last post September 13, 2011, 05:55
by cclapper

TinyPortal v1.0.5 beta 1© Bloc