aboutsummaryrefslogtreecommitdiff
path: root/exif.class.php
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-10-08 15:32:12 -0300
committerSilvio <silvio@devlet.com.br>2010-10-08 15:32:12 -0300
commit6715a36dad52d37b54c63c9ccc0f9532d61e1b43 (patch)
tree75ed1003f8e6882823d85d7682602db57e569cf6 /exif.class.php
parentc05faa3e82a8da6c968df5a1202f665e25622171 (diff)
downloadexif-6715a36dad52d37b54c63c9ccc0f9532d61e1b43.tar.gz
exif-6715a36dad52d37b54c63c9ccc0f9532d61e1b43.tar.bz2
CVS update
Diffstat (limited to 'exif.class.php')
-rw-r--r--exif.class.php13
1 files changed, 8 insertions, 5 deletions
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;
}
}