IPTC tag import enhancement suggestion
Posted: Sun Jan 27, 2008 5:39 pm
Hi everybody,
I found some bugs or bad functionality of reading IPTC tags of images in image gallery. I made some fixes in my blog and I propose these fixes also to you.
The main trouble was in the file (include/function_images.inc.php) at line about 2500, where you get the meta data (EXIF and IPTC) from the thumbnail file, not from the original file - see next line:
I is maybe the functionality of resize function, that it copies the exif tags, but not IPTC tags, so you get NEVER any IPTC header. I think the correct solution is to read the headers from original file.
I also fixed the parsing of IPTC date and time format, which has not the same format as the EXIF date tag.
Finally I found that the IPTC keys assigned to the database fields such as "short description" or "title" are not the ones that one would attend intuitively. So I changed this assignement to the more predictable ones.
The file as I use it on my blog is to download at:
http://vlada.ajgl.cz/myplugins/IPTC_1.zip
Bye Vladimir
I found some bugs or bad functionality of reading IPTC tags of images in image gallery. I made some fixes in my blog and I propose these fixes also to you.
The main trouble was in the file (include/function_images.inc.php) at line about 2500, where you get the meta data (EXIF and IPTC) from the thumbnail file, not from the original file - see next line:
Code: Select all
$file['dim'] = @getimagesize($file['full_thumb'],$file['header']);I also fixed the parsing of IPTC date and time format, which has not the same format as the EXIF date tag.
Finally I found that the IPTC keys assigned to the database fields such as "short description" or "title" are not the ones that one would attend intuitively. So I changed this assignement to the more predictable ones.
The file as I use it on my blog is to download at:
http://vlada.ajgl.cz/myplugins/IPTC_1.zip
Bye Vladimir