diff options
Diffstat (limited to 'admin/include/functions_metadata.php')
-rw-r--r-- | admin/include/functions_metadata.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 1b5b5bb73..01b453816 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -173,8 +173,24 @@ function get_sync_metadata($infos) $infos['filesize'] = floor($fs/1024); + $is_tiff = false; + if (isset($infos['representative_ext'])) { + if ($image_size = @getimagesize($file)) + { + $type = $image_size[2]; + + if (IMAGETYPE_TIFF_MM == $type or IMAGETYPE_TIFF_II == $type) + { + // in case of TIFF files, we want to use the original file and not + // the representative for EXIF/IPTC, but we need the representative + // for width/height (to compute the multiple size dimensions) + $is_tiff = true; + } + + } + $file = original_to_representative($file, $infos['representative_ext']); } @@ -184,6 +200,12 @@ function get_sync_metadata($infos) $infos['height'] = $image_size[1]; } + if ($is_tiff) + { + // back to original file + $file = PHPWG_ROOT_PATH.$infos['path']; + } + if ($conf['use_exif']) { $exif = get_sync_exif_data($file); |