From 38cb1fd9705cb62a3e50c717cd48a6f5b32c1016 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 1 Aug 2009 16:45:49 -0400 Subject: [PATCH] Add formatting for the UserComment field along with a TODO note --- framework/Image/lib/Horde/Image/Exif.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/Image/lib/Horde/Image/Exif.php b/framework/Image/lib/Horde/Image/Exif.php index b65da1296..e35c7f41a 100644 --- a/framework/Image/lib/Horde/Image/Exif.php +++ b/framework/Image/lib/Horde/Image/Exif.php @@ -399,6 +399,15 @@ class Horde_Image_Exif case 'DateTimeDigitized': return date('m/d/Y H:i:s O', $data); + case 'UserComment': + //@TODO: the first 8 bytes of this field contain the charset used + // to encode the comment. Either ASCII, JIS, UNICODE, or + // UNDEFINED. Should probably either convert to a known charset + // here and let the calling code deal with it, or allow this + // method to take an optional charset to convert to (would + // introduce a dependency on Horde_String to do the conversion). + return substr($data, 7); + default: return $data; } -- 2.11.0