note 129593 added to function.exif-read-data
| From: | dbareis@gmail.com | Date: | Tue, 18 Jun 2024 04:07:31 +0000 |
| Subject: | note 129593 added to function.exif-read-data | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221381@lists.php.net to get a copy of this message | ||
Windows fields are in a "WINXP" section (the format I don't know), but they are also
elsewhere including "comments" & "subject" in null terminated
"UTF-16LE" format, this code work for me:
...
$PhotoInfo->Comments = GetPhotoValueWindows16Bit($IDFO, 'Comments');
$PhotoInfo->Subject = GetPhotoValueWindows16Bit($IDFO, 'Subject');
function GetPhotoValueWindows16Bit(&$Array, $Index)
{
$Value16 = GetPhotoValue($Array, $Index);
if ($Value16 === null)
$R = null;
else
{
$R = iconv('UTF-16LE', 'UTF-8', $Value16); //Still ends in a
null byte
$R = str_replace("\x00", '', $R); //Remove trailing
null (but handle any).
}
return $R;
}
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 115.70.245.154)
----
Manual Page -- https://php.net/manual/en/function.exif-read-data.php
Edit -- https://main.php.net/note/edit/129593
Del: integrated -- https://main.php.net/note/delete/129593/integrated
Del: useless -- https://main.php.net/note/delete/129593/useless
Del: bad code -- https://main.php.net/note/delete/129593/bad+code
Del: spam -- https://main.php.net/note/delete/129593/spam
Del: non-english -- https://main.php.net/note/delete/129593/non-english
Del: in docs -- https://main.php.net/note/delete/129593/in+docs
Del: other reasons-- https://main.php.net/note/delete/129593
Reject -- https://main.php.net/note/reject/129593
Search -- https://main.php.net/manage/user-notes.php