diff options
author | Silvio <silvio@devlet.com.br> | 2010-10-08 15:32:12 -0300 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-10-08 15:32:12 -0300 |
commit | 6715a36dad52d37b54c63c9ccc0f9532d61e1b43 (patch) | |
tree | 75ed1003f8e6882823d85d7682602db57e569cf6 | |
parent | c05faa3e82a8da6c968df5a1202f665e25622171 (diff) | |
download | exif-6715a36dad52d37b54c63c9ccc0f9532d61e1b43.tar.gz exif-6715a36dad52d37b54c63c9ccc0f9532d61e1b43.tar.bz2 |
CVS update
-rw-r--r-- | CVS/Entries | 4 | ||||
-rw-r--r-- | 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; } } |