From 6715a36dad52d37b54c63c9ccc0f9532d61e1b43 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 8 Oct 2010 15:32:12 -0300 Subject: CVS update --- CVS/Entries | 4 ++-- exif.class.php | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CVS/Entries b/CVS/Entries index 6b8993b..c67f260 100644 --- a/CVS/Entries +++ b/CVS/Entries @@ -1,7 +1,7 @@ D/exif_location//// -/exif.class.php/1.1.2.16/Result of merge//TDRUPAL-6--1 /README.txt/1.6/Thu Oct 7 21:44:03 2010// /exif.info/1.4/Thu Oct 7 21:44:03 2010// /exif.install/1.4/Thu Oct 7 21:44:03 2010// -/exif.module/1.9/Result of merge+Thu Oct 7 21:44:03 2010// D/po//// +/exif.class.php/1.1.2.18/Result of merge//TDRUPAL-6--1 +/exif.module/1.9/Fri Oct 8 18:30:59 2010// diff --git a/exif.class.php b/exif.class.php index 29a0b02..8f310c8 100644 --- a/exif.class.php +++ b/exif.class.php @@ -66,23 +66,25 @@ Class Exif { return array(); } $exif = exif_read_data($file, 0); + $arSmallExif = array(); $arSmallExif = array_change_key_case((array)$exif, CASE_LOWER); $arSmallExif['computed'] = array_change_key_case((array)$arSmallExif['computed'], CASE_LOWER); //why this function isn't recursive is beyond me $arSmallExif['thumbnail'] = array_change_key_case((array)$arSmallExif['thumbnail'], CASE_LOWER); $arSmallExif['comment'] = array_change_key_case((array)$arSmallExif['comment'], CASE_LOWER); $info = array(); - + foreach ($arTagNames as $tagName) { if ($tagName['section'] != 'iptc') { if (!empty($arSmallExif[$tagName['tag']])) { - $info[$tagName['section'] .'_'. $tagName['tag']] = $arSmallExif[$tagName['tag']]; + $info[$tagName['section'] .'_'. $tagName['tag']] = utf8_encode($arSmallExif[$tagName['tag']]); } elseif (!empty($arSmallExif[$tagName['section']][$tagName['tag']])) { - $info[$tagName['section'] .'_'. $tagName['tag']] = $arSmallExif[$tagName['section']][$tagName['tag']]; + $info[$tagName['section'] .'_'. $tagName['tag']] = utf8_encode($arSmallExif[$tagName['section']][$tagName['tag']]); } } } + return $info; } @@ -112,6 +114,7 @@ Class Exif { $humanReadableKey = $this->getHumanReadableIPTCkey(); $size = GetImageSize ($file, $infoImage); $iptc = empty($infoImage["APP13"]) ? array() : iptcparse($infoImage["APP13"]); + $arSmallIPTC = array(); if (is_array($iptc)) { foreach ($iptc as $key => $value) { @@ -167,8 +170,8 @@ Class Exif { foreach ($arTagNames as $tagName) { if ($tagName['section'] == "xmp") { // Get XMP field. - $config = $map[$tagName['tag']]; - $field = $this->readXMPItem($xmp, $config); + $config = $map[$tagName['tag']]; + $field = $this->readXMPItem($xmp, $config); $info[$tagName['section'] .'_'. $tagName['tag']] = $field; } } -- cgit v1.2.3