From: Michael J. Rubinsky Date: Sat, 1 Aug 2009 20:45:49 +0000 (-0400) Subject: Add formatting for the UserComment field along with a TODO note X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=38cb1fd9705cb62a3e50c717cd48a6f5b32c1016;p=horde.git Add formatting for the UserComment field along with a TODO note --- 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; }