diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2013-01-25 15:25:06 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-25 15:25:06 -0800 |
| commit | 3fa7b66585a70149e6d3eb2d064661fb929f8613 (patch) | |
| tree | a3fc95e0acb8818454fa1a6e5a98558650bcd140 /modules/gallery/helpers/graphics.php | |
| parent | 776fe75ceb93f8eb729d13d58fb411d6ceeb9270 (diff) | |
| parent | 212944e1eae2ffb9a3e27ea7d1c6813160cce1ed (diff) | |
Merge pull request #96 from shadlaws/fix_1951
#1951 - Make metadata generation more flexible (photo and movie helpers).
Diffstat (limited to 'modules/gallery/helpers/graphics.php')
| -rw-r--r-- | modules/gallery/helpers/graphics.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 51437d4b..0c5f8366 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -195,9 +195,8 @@ class graphics_Core { } else { copy(MODPATH . "gallery/images/missing_photo.png", $item->thumb_path()); } - $dims = getimagesize($item->thumb_path()); - $item->thumb_width = $dims[0]; - $item->thumb_height = $dims[1]; + list ($item->thumb_width, $item->thumb_height) = + photo::get_file_metadata($item->thumb_path()); } if (!empty($ops["resize"])) { @@ -206,9 +205,8 @@ class graphics_Core { } else { copy(MODPATH . "gallery/images/missing_photo.png", $item->resize_path()); } - $dims = getimagesize($item->resize_path()); - $item->resize_width = $dims[0]; - $item->resize_height = $dims[1]; + list ($item->resize_width, $item->resize_height) = + photo::get_file_metadata($item->resize_path()); } $item->save(); } catch (Exception $e) { |
